Home » C Programming » Functions

What will be the output of the program in 16 bit platform (Turbo C under DOS)? #include int main() { int fun(); int i; i = fun(); printf("%d\n", i); return 0; } int fun() { _AX = 1990; }

Correct Answer: 1990

Explanation:

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


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


← Previous Question Next Question→

More Questions from Functions

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion