Violation of the C definition?
The C standard states that any character in the machine's standard printing set will never be negative.But the following code:
char c=1234;
printf("%d\t%c",c,c);
gives a negative output and prints a strange character,meaning that the character is in machine's printing character set.Is the C standard being violated here?
The C standard states that any character in the machine's standard printing set will never be negative.But the following code:
char c=1234;
printf("%d\t%c",c,c);
gives a negative output and prints a strange character,meaning that the character is in machine's printing character set.Is the C standard being violated here?
No comments:
Post a Comment