Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2024 Set 2
Questions

Q3

MCQ1 mark, −0.33Programming

Consider the following C\text{C} program. Assume parameters to a function are evaluated from right to left.

#include <stdio.h>
int g(int p) { printf("%d", p); return p; }
int h(int q) { printf("%d", q); return q; }
void f(int x, int y) {
    g(x);
    h(y);
}
int main() {
    f(g(10), h(20));
}

Which one of the following options is the CORRECT output of the above C\text{C} program?

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.