@gaurav456 lets go to DELD/CO to understand output of your code

unsigned int a =3 , b=5,c;

c=a-b;

print(c);

first of all as sushmita said , there is no difference between representation of unsigned int and signed. it is just way cpu interpret this

suppose cpu using 8 bit for representation and used 2's compliment system

then -3 in signed representation is

0000 0011 (3)

1111 1100 (1s compliment)

1111 1101 (2s compliment)

now coming to your question

a =3 will be represented as 0000 0011

b=5 will be represented as 0000 0101

a-b will be done by taking b's 2's compliment and adding it to a.

0000 0101 (b)

1111 1010 (b's 1s compliment)

1111 1011 (b's 2s compliment)

a-b = 0000 0011

+1111 1011

gives 1111 1110 (no carry generated)

Now rule says if carry generated ignore it (means answer is positive), but if no carry generated take 2's compliment(means answer is -ve , note that computer don't do take compliment , we take for our understanding purpose ) ( I wrote in just one simple sentence but there whole new concept behind it)

so here as no carry generated answer is -ve and to get t magnitude take compliment(2's )

0000 0010 (2)

hence output is -2