what will be the output of" printf("%d%d",scanf("%d%
d",&a&b));"

Answers were Sorted based on User's Feedback



what will be the output of" printf("%d%d",scanf("%d% d",&a&b));&qu..

Answer / satya

main()
{
int a,b;
printf("%d,%d",scanf("%d%d",&a,&b));
}


=> do u mean above program's output...
=>output will be:2,whatever you enter value for b.
=>because scanf is a library fn which will return how many
arguements it processes, and second value

Is This Answer Correct ?    3 Yes 1 No

what will be the output of" printf("%d%d",scanf("%d% d",&a&b));&qu..

Answer / pusuluri leela prasad

first it will return no of values that scanf can return and
second it will return first value of the scanf statement

Is This Answer Correct ?    1 Yes 0 No

what will be the output of" printf("%d%d",scanf("%d% d",&a&b));&qu..

Answer / praveen

No, The output will not be 2......The exact output is "It
will take the garbage value"

Is This Answer Correct ?    0 Yes 1 No

what will be the output of" printf("%d%d",scanf("%d% d",&a&b));&qu..

Answer / bhavani

=>output will be:2,whatever you enter value for a.
=>because scanf is a library fn which will return how many
arguements it processes, and first value

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

0 Answers   Wilco,


Is both getch() and getchar() functions are similar? if it is similar means why these two functions are used for same usage? if it is not similar means what is the difference?

1 Answers   Infosys,


What is c preprocessor mean?

0 Answers  


What is the use of clrscr?

0 Answers  


What are the 4 types of functions?

0 Answers  






write a program to print the all 4digits numbers & whose squares must me even numbers?

2 Answers   Virtusa,


Can we declare function inside main?

0 Answers  


Explain what is the best way to comment out a section of code that contains comments?

0 Answers  


what is the use of keyword volatile??

4 Answers   LG Soft,


what is the flow of execution in cprogram? ex:printf();,scanf();

2 Answers  


Reverse the part of the number which is present from position i to j. Print the new number. eg: num=789876 i=2 j=5 778986

1 Answers  


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

0 Answers   InterGraph,


Categories