what is the output for the code :
main()
{
int i,j;
printf("%d %d ",scanf("%d%d",&i,&j));
}
Answer Posted / carol
scanf will return the number of arguments that are scanned
successfully from keyboard.So first it will get two values
from the user and return two . So the printf statement
prints 2 for the first %d and since there is no specific
value for second %d it will print garbage value.
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is table lookup in c?
about c language
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
How can I remove the leading spaces from a string?
Explain how do you generate random numbers in c?
What is wrong with this program statement? void = 10;
How many levels of indirection in pointers can you have in a single declaration?
What do you mean by c what are the main characteristics of c language?
What is this infamous null pointer, anyway?
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
Why do we need arrays in c?
What is the best way of making my program efficient?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
What is gets() function?