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
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 |
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 |
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 |
What are the types of arrays in c?
what is structuer?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
Write a program on swapping (100, 50)
How to swap two values using a single variable ? condition: Not to use Array and Pointer ?
4. main() { int c=- -2; printf("c=%d",c); }
Why is extern used in c?
for(;;) printf("C language") What is out put of above??
2 Answers Practical Viva Questions,
How do we select the big element or any other operation from array which is read dynamically. user need to give the elements only no need to mention the size.
what is the difference between declaration ,defenetion and initialization of a variable?
write a reverse string to print a stars.(with out using logic) ***** **** *** ** *
about c language