Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Doubt in suffix for a variable

Status
Not open for further replies.

Murugesh_89

Full Member level 5
Joined
Nov 23, 2012
Messages
266
Helped
7
Reputation
12
Reaction score
6
Trophy points
1,298
Location
India
Activity points
3,267
Hi,
Please let me know the reason..

My program is...

void main()
{
int a,b;

a = -1;
b = -1u;

if(a == b) do_task1;
else do_task2;
}

The condition passes and do the task1. Why is it so even though i made b as unsigned??

Need reason for this...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top