# Doubt in suffix for a variable

Status
Not open for further replies.

#### Murugesh_89

##### Full Member level 5
Hi,
Please let me know the reason..

My program is...

void main()
{
int a,b;

a = -1;
b = -1u;

}

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

Need reason for this...

##### Banned
You have declared a and b as int variables?
Code:
 int a,b;
Code:
 Change it to unsigned int a , b;
and see if you get the right value.

Status
Not open for further replies.