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

how to find the largest element of array without using relational operater?

6 Answers   Satyam, Wipro,


Explain the difference between the local variable and global variable in c?

0 Answers  


How can I list all of the predefined identifiers?

0 Answers  


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

0 Answers   College School Exams Tests,


i need all types of question paper releted to "c" and other language.

0 Answers  






write a program to display all prime numbers

0 Answers  


What is a node in c?

0 Answers  


What has to put when we are inserting as assembly language code into the C code? or When we are inserting as assembly language code into the C code we have to insert one thing at the start and of the assembly language. What are they?

2 Answers  


Explain the red-black trees?

0 Answers  


What is function pointer c?

0 Answers  


How do you search data in a data file using random access method?

0 Answers  


Given an unsigned integer, find if the number is power of 2?

5 Answers  


Categories