0

I have two c codes, the difference between them is that one uses char and one uses int, as follows,

First:

if case is true

int x = -1;
unsigned int y = 2;
if(x>y)

Second:

the if case is false

char x = -1;
unsigned char y = 2;
if(x>y)

Why does this happen?

EsmaeelE
  • 1,951
  • 5
  • 18
  • 27
Ahmad Anwar
  • 123
  • 8

0 Answers0