what is the output for the code :
main()
{
int i,j;
printf("%d %d ",scanf("%d%d",&i,&j));
}

Answer Posted / sha

The first output would be the number of values scanned by
scanf, i.e. 2. I compiled the code and the second output
seems to be the address the second input given by user.

Input: 4 5
Output: 2 1242772

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we write return 0 in c?

764


What is the difference between pure virtual function and virtual function?

854


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1691


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

1935


What are the 5 types of inheritance in c ++?

753


How do you list files in a directory?

790


What is structure padding and packing in c?

801


List the difference between a While & Do While loops?

836


What is a substring in c?

777


pierrot's divisor program using c or c++ code

1952


What are the 5 elements of structure?

803


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

2708


What is a #include preprocessor?

810


what will be the output for the following main() { printf("hi" "hello"); }

10082


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

1021