Reputation
Top tag
Next privilege 125 Rep.
Vote down
Badges
1 4
Impact
~3k people reached

  • 0 posts edited
  • 0 helpful flags
  • 0 votes cast
May
26
awarded  Notable Question
Sep
24
awarded  Autobiographer
Aug
18
awarded  Popular Question
Mar
10
awarded  Editor
Nov
9
comment Why does an unsigned int compared with a signed character turn out with an unexpected result?
Also I would like to know what is by-default char in C:unsigned char or signed char?
Nov
9
comment Why does an unsigned int compared with a signed character turn out with an unexpected result?
@thorstenmüller If I write char c;printf("%d", c); it would print always postive or a negative number?
Nov
9
comment Why does an unsigned int compared with a signed character turn out with an unexpected result?
@Useless Sorry for saying "int is unsigned by default"
Nov
9
comment Why does an unsigned int compared with a signed character turn out with an unexpected result?
@thorstenmüller I have one more confusion when Iam removing unsigned from int then the output must be same as by-default int is unsigned.But the output gets reversed.Why so?
Nov
9
comment Why does an unsigned int compared with a signed character turn out with an unexpected result?
@thorstenmüller It means always there would be casting of signed to unsigned. Is there is a possibility of unsigned to signed conversion?
Nov
9
comment Why does an unsigned int compared with a signed character turn out with an unexpected result?
But how Compiler decide whether unsigned would be cast to signed or vice-versa ?
Nov
9
awarded  Student
Nov
9
asked Why does an unsigned int compared with a signed character turn out with an unexpected result?