Sail E0 Webinar
Question


What will be the output of the program in 16 bit platform (Turbo C under DOS)?


#include<stdio.h>
int main()
{
int fun();
int i;
i = fun();
printf("%d\n", i);
return 0;
}
int fun()
{
_AX = 1990;
}
Options:
A .  Garbage value
B .  0 (Zero)
C .  1990
D .  No output
Answer: Option C

Turbo C (WINDOW ): The return value of the function is taken from the Accumulator _AX=1990.

But it may not work as expected in GCC compiler (Linux).




Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers