Question 13

CSMCQ1 markNeeds review
Consider the following 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 program?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

EXPLORE & PRACTISE

Paper and topic context

See where this question comes from and choose what to practise next.

2024CS

GATE CSE 2024 · Paper 2

Computer Science and Information Technology · Original paper archive

Section
Computer Science and Information Technology
Question type
Multiple choice (MCQ)
Marks
1 mark

Practise related topics

Explore more previous year questions using this question’s imported topic tags.

computer science

GATE CSE previous year questions

information technology

GATE CSE previous year questions

computing

GATE CSE previous year questions

programming data structures

GATE CSE previous year questions

Programming and Data Structures

GATE CSE previous year questions

Comments

Ask a question, share your approach, or help someone understand.

Log in to view the discussion

You’re not logged in. Log in or create an account to see discussions and add comments.