Consider the following C program. Assume parameters to a function are evaluated from right to left.
Which one of the following options is the CORRECT output of the above C program?
c
- A20101020
- B10202010
- C20102010
- D10201020
Programming in CFunctions, Parameter Passing, Scope Rules, RecursionMCQ1 mark · −1/3 if wrongEasy
1# include <stdio.h>
2int g(int p) { printf ("%d", p); return p; }
3int h(int q) { printf ("%d", q); return q; }
4void f(int x, int y) {
5 g(x);
6 h(y);
7}
8int main( ) {
9 f(g(10), h(20));
10}
11A GATE question every morning
One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.