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

How to set file pointer to beginning c?

0 Answers  


What is masking?

0 Answers  


What happens if header file is included twice?

0 Answers  


Can you add pointers together? Why would you?

0 Answers  


what is recursion in C

0 Answers   Cap Gemini,






how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

0 Answers   Gopaljee, TCS,


How do shell structures work?

0 Answers  


#define min((a),(b)) ((a)<(b))?(a):(b) main() { int i=0,a[20],*ptr; ptr=a; while(min(ptr++,&a[9])<&a[8]) i=i+1; printf("i=%d\n",i);}

3 Answers  


How do you define CONSTANT in C?

0 Answers   ADP,


which types of data structure will i use to convert infix to post fix???

5 Answers   IIT,


How do I convert a string to all upper or lower case?

0 Answers  


write a c program to find the roots of a quadratic equation ax2 + bx + c = 0

11 Answers   CSC, St Marys, TATA,


Categories