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
Difference between malloc() and calloc() function?
What is the right type to use for boolean values in c?
Who is the main contributor in designing the c language after dennis ritchie?
write a progrmm in c language take user interface generate table using for loop?
What are called c variables?
What is the collection of communication lines and routers called?
What is the difference between volatile and const volatile?
What is c system32 taskhostw exe?
What does 3 mean in texting?
How do I swap bytes?
What do you mean by keywords in c?
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier. Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed. When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed. Sequence of take-off is the sequence of addition to the waitlist
What is an array? What the different types of arrays in c?
Can you pass an entire structure to functions?
What is static memory allocation? Explain