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);

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are the different file extensions involved when programming in c?

841


What are enums in c?

840


What is the return type of sizeof?

809


Why we not create function inside function.

1962


What are the types of variables in c?

771


Can include files be nested?

831


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

2150


Is sizeof a keyword in c?

755


When c language was developed?

819


What is the difference between the local variable and global variable in c?

721


What is the difference between single charater constant and string constant?

849


Is javascript based on c?

786


Explain the difference between null pointer and void pointer.

847


What is difference between %d and %i in c?

898


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

790