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
you are right mr.Satya but i found my self unable to
understand that for the first time scanf returns the no of
successful matches but how for the second time it returns
the value of 'b'.while a function should return the
same 'r' value every time.



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

Answer / gulam sarwar chuwdhury

The output :2,the value of b

Is This Answer Correct ?    7 Yes 2 No

Post New Answer

More C Interview Questions

biggest of two no's with out using if condition statement

5 Answers  


What are the different types of objects used in c?

0 Answers  


HOW TO FIND OUT THE RREVERS OF A GIVEN DIGIT NUMBER IF IT IS INPUT THROUGH THE KEYBORD BY USING C LANGUAGE

3 Answers   Wipro,


Why is c called c not d or e?

0 Answers  


What does & mean in scanf?

0 Answers  






Can I initialize unions?

0 Answers  


int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output?

14 Answers   Verifone,


How many loops are there in c?

0 Answers  


What is %g in c?

0 Answers  


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

0 Answers  


Can variables be declared anywhere in c?

0 Answers  


write a c program for print your name .but,your name may be small letter mean print a capital letter or your name may be capital letter mean print a small letter .example \\enter ur name : sankar The name is: SANKAR (or) enter your name:SAnkar The name is:saNKAR

5 Answers  


Categories