This question is releated to C Langauge
What is the answer of the following and how it is comming:-
#include
#include
main()
{
char a='\101'
printf("%c",a);
}
Web Development
What is the answer of the following and how it is comming:-
#include
#include
main()
{
char a='\101'
printf("%c",a);
}
by bigbox
Maybe it's a "slip of the pen", but you forgot a semocolon after the definition of "a" variable.
I think, symbol with code decimal "101" will be printed. :)
by ms_saini3302
by gary_w
When you prefix a number with a backslash, that means it's an octal (base 8) value.
Octal 101 = 'A'
by ms_saini3302
by xorex
if correct:
#include
#include
main()
{
char a='\101' ; <- must be symbol ';'
printf("%c",a);
}
then will be printed 'A' - symbol with hex code 0x65
by ms_saini3302
by ms_saini3302
This discussion is closed to new replies.
Sort by Trending