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 do you mean by c what are the main characteristics of c language?

0 Answers  


What are the features of c languages?

0 Answers  


what is compiler

6 Answers  


What are the types of data types and explain?

0 Answers  


is assignment operator is arithmatic or not

3 Answers   Infosys,






What should be keep precautions while using the recursion method?

1 Answers  


What is the value of h?

0 Answers  


What is fflush() function?

0 Answers  


EXPLAIN #INCLUDE<STDIO.H> EXPLAIN #INCLUDE<CONIO.H>

4 Answers  


What is zero based addressing?

0 Answers  


How are 16- and 32-bit numbers stored?

0 Answers  


void main() { int a=1; printf("%d %d %d",a,++a,a++); } the output is supposed to be 1 2 2....but it is 3 3 1 this is due to calling conventions of C. if anyone can explain me how it happens?

7 Answers  


Categories