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 is a pointer in c?
How many types of sorting are there in c?
Are the variables argc and argv are always local to main?
What is nested structure with example?
What is sizeof array?
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
Are the expressions * ptr ++ and ++ * ptr same?
What is wild pointer in c with example?
What is c method?
Can you mix old-style and new-style function syntax?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
Add Two Numbers Without Using the Addition Operator
What is meant by type specifiers?
What is the difference between array and pointer?
Why C language is a procedural language?