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

to find the closest pair

0 Answers   Infosys,


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

0 Answers   Case, IBM,


what is the use of ~ in c lang?????

3 Answers  


Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors

3 Answers  


swap two integer variables without using a third temporary variable?

6 Answers   Persistent,






Consider the following C program. #include <stdio.h> int main() { int i; for (i=0;i<3;++i) { fork();fork(); } } How many processes are created when running this program (including the initial one)? Explain

2 Answers  


write a c program to accept a given integer value and print its value in words

4 Answers   Vernalis, Vernalis Systems,


What is c standard library?

0 Answers  


Write a C program to check a number even or odd, without using any relational, arithmetic operator and any loops.

1 Answers  


What is the purpose of realloc()?

0 Answers  


Write a program to reverse a linked list in c.

0 Answers   DELL, HAL,


What is getche() function?

0 Answers  


Categories