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 "Duff's Device"?
What is calloc() function?
What are the uses of null pointers?
Is c still used?
What is abstract data structure in c?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
Difference between Function to pointer and pointer to function
What are register variables in c?
Describe the modifier in c?
Compare and contrast compilers from interpreters.
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
What is || operator and how does it function in a program?
How can I manipulate strings of multibyte characters?
What do you mean by keywords in c?