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 |
HOW DO YOU HANDLE EXCEPTIONS IN C?
What is meaning of "Void main" in C Language.
24 Answers Ford, GU, HCL, IBIBS, JUW, TCS,
program for following output using for loop? 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5
What is the 'named constructor idiom'?
What is the difference between variable declaration and variable definition in c?
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
When can you use a pointer with a function?
What is the difference between null pointer and the void pointer?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
Why array starts with index 0
Write a program to implement queue.
struct node {struct node*temp,*new} prinf("%d",sizeof(struct node));