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

if function is declared as static in one source file, if I would like to use the same function in some other source file...is it possible....how ?

2 Answers   NetApp,


What is page thrashing?

0 Answers  


True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type

7 Answers  


What is a scope resolution operator in c?

0 Answers  


write a C program, given number is double without using addt ion and multiplication operator?ex:n=6,ans=12,pls send me ans to goviseenu@gmail.com

6 Answers  






What is void main ()?

0 Answers  


how to swap four numbers without using fifth variable?

2 Answers  


write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values.  The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.

0 Answers  


explain what are actual arguments?

0 Answers  


Which header file is used for clrscr?

0 Answers  


What is #ifdef ? What is its application?

0 Answers   TCS,


what does ‘#include’ mean?

1 Answers   TCS,


Categories