char ch=10;printf("%d",ch);what is the output

Answers were Sorted based on User's Feedback



char ch=10;printf("%d",ch);what is the output..

Answer / jj

answer is 49,a character constant can be one character
so ch=10----> here 1 is taken as character,in print
statement it is conv to ascii

Is This Answer Correct ?    0 Yes 8 No

char ch=10;printf("%d",ch);what is the output..

Answer / jj

answer is 49,a character constant can be one character
so ch=10----> here 1 is taken as character,in print
statement it is conv to ascii

Is This Answer Correct ?    0 Yes 9 No

char ch=10;printf("%d",ch);what is the output..

Answer / kalpana.y


There will be no output

because, in printf statement it is declared in %d
%d is integer variable
%s should be declared

Is This Answer Correct ?    0 Yes 10 No

char ch=10;printf("%d",ch);what is the output..

Answer / jj

answer is 49,a character constant can be one character
so ch=10----> here 1 is taken as character,in print
statement it is conv to ascii

Is This Answer Correct ?    0 Yes 10 No

Post New Answer

More C Interview Questions

write a program to swap two numbers without using temporary variable?

3 Answers  


What is bash c?

0 Answers  


How can I call a function, given its name as a string?

4 Answers   ABC Telecom,


code for replace tabs with equivalent number of blanks

0 Answers   Bosch,


how to write optimum code to divide a 50 digit number with a 25 digit number??

0 Answers   MGM,






Multiply an Integer Number by 2 Without Using Multiplication Operator

0 Answers  


Can you explain the four storage classes in C?

0 Answers   TCS,


WHO WROTE C LANGUAGE?

4 Answers  


If 4 digits number is input through the keyboard, Write a program to calculate sum of its 1st & 4th digit.

12 Answers   Google,


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

0 Answers   IBM,


What is the output for the below program? void main() { float me=1.1; double you=1.1; if(me==you) printf("love c"); else printf("know c"); }

7 Answers  


what is the difference between #include<stdio.h> and #include"stdio.h" ?

6 Answers   TCS,


Categories