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 |
Can you please explain the difference between malloc() and calloc() function?
What is the size of enum in c?
How will you divide two numbers in a MACRO?
write a program to swap Two numbers without using temp variable.
75 Answers EMC, Focus, GreyB, HCL, Hitech, HP, Huawei, Infosys, Mannar Company, Microsoft, Miles Software, Odessa Technologies, Satyam, TCS, Wipro,
how to print "hai" in c?
write a c/c++ programthat connects to a MYSQL server and checks if the INNoDB plug in is installed on it.If so your program should print the total number of disk writes by MYSQL.
What is string constants?
What is meant by high-order and low-order bytes?
what is the difference between auto and static keywords
1 Answers cDot, College School Exams Tests, TCS,
if the address of a[1,1] and a[2,1] are 1000 and 1010 respectively and each occupies 2 bytes then the array has been stored in what order?
4 Answers Amazon, Apple, Bata, Google, NASA,
Are the outer parentheses in return statements really optional?
write a programming in c language, 1 3 5 7 9 11