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

How can I read and write comma-delimited text?

0 Answers  


Can you think of a logic behind the game minesweeper.

0 Answers  


Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.

3 Answers   SilverKey,


shorting algorithmS

0 Answers   Wipro,


any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above

0 Answers  






What is indirection?

0 Answers  


Explain what are linked list?

0 Answers  


Write a program to check prime number in c programming?

0 Answers  


how can i get the string which is having two spaces at the end.suppose the string is "Hello World ".Now at the end i have two spaces.i need to print with that spaces .

1 Answers  


array contains zeros and ones as elements.we need to bring zeros one side and one other side in single parse. ex:a[]={0,0,1,0,1,1,0,0} o/p={0,0,0,0,0,1,1,1}

12 Answers   Google, Motorola,


Why is c so important?

0 Answers  


What is the sizeof () operator?

0 Answers  


Categories