what will be the output of "printf("%d%d",scanf("%d%
d",&a,&b))".provide an explation regarding the question

Answers were Sorted based on User's Feedback



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

Answer / dipendra

i think it will print the 2, and some garbage value.

Is This Answer Correct ?    10 Yes 0 No

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

Answer / amegha

scanf() returs the number of vlaues read successfully. so
heree the pritf() prints the value that is returned by the
scanf(), ie 2.(a,b). so the output will be 2 and some
garbage value.

Is This Answer Correct ?    5 Yes 1 No

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

Answer / manish soni bca 3rd year jaipu

what is output of this program
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
a=10;
b=20;
printf("%d %d");
getch();
}

it gives the 20 10;
bcoz printf fn return which value,
read recently ,reversely.
so above question we easly explain.
that;-
so scanf fn return which value process it.
scanf fn return 2 and after return value of b.


manish soni bca 3rd year jaipur tagore college

Is This Answer Correct ?    2 Yes 0 No

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

Answer / manish soni bca 3rd year jaipu

if we enter
1234
5678
answer is
2 5678
plz tell how

Is This Answer Correct ?    2 Yes 1 No

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

Answer / akki166786

you are right mr. manish that it will print 2 and value of
'b' but i also dont know why it is printing the value of 'b'..

Is This Answer Correct ?    1 Yes 0 No

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

Answer / nilambuja

the output will be what value of a and b...

Is This Answer Correct ?    2 Yes 8 No

Post New Answer

More C Interview Questions

CAN WE DEFINE ANY FUNCTION WITHIN A FUNCTION.

15 Answers  


How do i store a paragraph into a string? for example, if i input a long paragraph, the program will read the words one by one and concatenate them until no word is left.

1 Answers  


every function has return the value?

1 Answers  


why ordinary variable store the later value not the initial

1 Answers  


what is self refrential structure

3 Answers   HCL,






What is the maximum length of an identifier?

0 Answers  


what is the difference between unix os and linux os

4 Answers  


How can I call a function with an argument list built up at run time?

0 Answers  


How do I send escape sequences to control a terminal or other device?

0 Answers  


How is null defined in c?

0 Answers  


Why c is called procedure oriented language?

0 Answers  


Mention four important string handling functions in c languages .

0 Answers  


Categories