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 |
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.
how to execute a program using if else condition and the output should enter number and the number is odd only...
Give a method to count the number of ones in a 32 bit number?
code snippet for creating a pyramids triangle ex 1 2 2 3 3 3
What does a run-time "null pointer assignment" error mean?
write a program that accepts 3 numbers from the user. dispaly the values in a descending order.
What is the output of printf("%d", printf("Hello"));?
count the numbers between 100 and 300, that star with 2 and ends with 2
Does c have function or method?
Is a house a mass structure?
Why c is procedure oriented?
What is the difference between a free-standing and a hosted environment?