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

Write a program in C to print the alphabets in order as on a mobile phone.i.e:When 2 is pressed once 'a' prints and if it is pressed two times 'b' prints and so on.we have to print all the alphabets as on mobile phone like this.

1 Answers   Wipro,


how to execute a program using if else condition and the output should enter number and the number is odd only...

0 Answers  


Give a method to count the number of ones in a 32 bit number?

4 Answers  


code snippet for creating a pyramids triangle ex 1 2 2 3 3 3

4 Answers  


What does a run-time "null pointer assignment" error mean?

2 Answers  


write a program that accepts 3 numbers from the user. dispaly the values in a descending order.

3 Answers  


What is the output of printf("%d", printf("Hello"));?

1 Answers  


count the numbers between 100 and 300, that star with 2 and ends with 2

5 Answers   Mind Tree,


Does c have function or method?

0 Answers  


Is a house a mass structure?

0 Answers  


Why c is procedure oriented?

0 Answers  


What is the difference between a free-standing and a hosted environment?

0 Answers   Aspire,


Categories