what is the output on the screen?

int n;
n=printf("my name is %d",printf("kiran %d",printf("kumar")));
printf("\n %d \n",n);

Answers were Sorted based on User's Feedback



what is the output on the screen? int n; n=printf("my name is %d",printf("kiran %..

Answer / raghav

hi the answer is bit scribbling
answer is
kumar kiran 5my name is 7/n12/n

Is This Answer Correct ?    8 Yes 3 No

what is the output on the screen? int n; n=printf("my name is %d",printf("kiran %..

Answer / nish

kumarkiran 5my name is 7
n=12

Is This Answer Correct ?    1 Yes 1 No

what is the output on the screen? int n; n=printf("my name is %d",printf("kiran %..

Answer / krishnachaitanya

n is 12.
because every printf() statement returns an integer value.
in the above code i.e printf("my name is %d",printf("kiran
%d",printf("kumar")));
kiran returns 5
the correct ans is
kumarkiran5 my name is 6
n=12

Is This Answer Correct ?    2 Yes 4 No

what is the output on the screen? int n; n=printf("my name is %d",printf("kiran %..

Answer / kirankumaryakkala

see the printf defination at stdio.h

its, int printf(const char *,...)
//printf returns no of charecters written to the screen
// and ... represents variable no of arguments
//now every printf returns one integer corresponding to the
no of charecters written on the screen.

its simple , now u can guess
try it.

Is This Answer Correct ?    1 Yes 7 No

Post New Answer

More C Interview Questions

What is the use of gets and puts?

0 Answers  


Is a house a shell structure?

0 Answers  


WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?

4 Answers  


WHAT IS HIGH LEVEL LANGUAGE?

2 Answers  


Is c# a good language?

0 Answers  






what is the role you expect in software industry?

0 Answers   HCL,


main() { int x, arr[8]={11,22,33,44,55,66,77,88}; x=(arr+2)[3]; printf(“%d”,x); }

8 Answers   Vector,


Tell me the use of bit field in c language?

0 Answers  


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

0 Answers  


What do you mean by dynamic memory allocation in c? What functions are used?

0 Answers  


print the table 5 in loops

3 Answers  


what are the stages of compilation

1 Answers   Bosch,


Categories