char ch=10;printf("%d",ch);what is the output
Answer Posted / abdur rab
The output will be 10.
char consists of 1 byte = 8 bits
it can hold any value between 0 - 127
an unsigned char can hold any 0 - 256
the asci value 10 is newline,
so if u format it as char using %c
printf ( "\n|%c|", ch ); the 10 is converted to new line
otherwise if u format it to int using %d, it ud print 10
| Is This Answer Correct ? | 18 Yes | 1 No |
Post New Answer View All Answers
What are the 4 types of programming language?
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
How can I automatically locate a programs configuration files in the same directory as the executable?
difference between object file and executable file
Is c object oriented?
What is the size of structure pointer in c?
What are the 3 types of structures?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
C language questions for civil engineering
What is 2c dna?
Is flag a keyword in c?
What is atoi and atof in c?
Why is c called "mother" language?
What is s in c?