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

Write a program to print prime nums from 1-20 using c programing?

13 Answers   IBM,


Method Overloading exist in c ?

3 Answers   Wipro,


i want to make a program in which we use input having four digits(4321) and get output its reciprocal(1234).

1 Answers  


what is software?

7 Answers   Wipro,


is it possible to change the default calling convention in c ?

1 Answers   Aptech,


What is the purpose of the statement: strcat (S2, S1)?

0 Answers  


What is integer constants?

0 Answers  


What is 'bus error'?

0 Answers  


How do we swap or interchange any 2 numbers without using Temporary variable...Anybody can pls answer it.. Thanks in Advance

8 Answers  


What is pass by value in c?

0 Answers  


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

0 Answers  


Can two or more operators such as and be combined in a single line of program code?

0 Answers  


Categories