int a=1,b=2,c=3;
printf("%d,%d",a,b,c);
What is the output?

Answer Posted / jaya prakash

1,2

because arguments of functions stored in stock
in stock stored as
"%d,%d"
a
b
c
in printf fn,
args popped out from stack
first "%d,%d" is popped
it find two int involved by %d in the control string
so two more args popped out
a,b
after popping the addr's then the values in that location
printed.(1,2)

Is This Answer Correct ?    28 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of pragma in embedded c?

593


Can you subtract pointers from each other? Why would you?

558


in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above

601


What is #line?

612


Which is best linux os?

566






C program to find all possible outcomes of a dice?

1856


How can I write a function analogous to scanf?

661


Difference between strcpy() and memcpy() function?

681


Differentiate between static and dynamic modeling.

621


How is a structure member accessed?

586


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

606


What is %lu in c?

688


How can you invoke another program from within a C program?

619


What does dm mean sexually?

815


Which driver is a pure java driver

994