what will be the output of" printf("%d%d",scanf("%d%
d",&a&b));"
Answers were Sorted based on User's Feedback
Answer / satya
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
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / pusuluri leela prasad
first it will return no of values that scanf can return and
second it will return first value of the scanf statement
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / praveen
No, The output will not be 2......The exact output is "It
will take the garbage value"
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / bhavani
=>output will be:2,whatever you enter value for a.
=>because scanf is a library fn which will return how many
arguements it processes, and first value
| Is This Answer Correct ? | 0 Yes | 2 No |
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
0 Answers Aegis, CDAC, Infosys,
Describe the steps to insert data into a singly linked list.
How to write the code of the program to swap two numbers with in one statement?
How can a number be converted to a string?
how to print 2-D array using a single for loop?
2 Answers Mind Tree, TCS, Value Labs,
Explain what is the difference between a free-standing and a hosted environment?
Can we add pointers together?
How do I swap bytes?
Why is void main used?
what is the difference between these initializations? Char a[]=”string”; Char *p=”literal”; Does *p++ increment p, or what it points to?
write a program to search for an element in a given array. If the array was found then display its position otherwise display appropriate message in c language
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }