GATE CS 2019 (Forenoon) — Question 28

Programming in CFunctions, Parameter Passing, Scope Rules, RecursionNAT1 markMedium

Consider the following C program:
c
1#include <stdio.h>
2int jumble(int x, int y) {
3    x = 2 * x + y;
4    return x;
5}
6int main ( ) {
7    int x = 2, y = 5;
8    y = jumble(y, x);
9    x = jumble(y, x);
10    printf("%d\n", x);
11    return 0;
12}
13
The value printed by the program is ________.
Practise the full 2019-FN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAFree All-India Mock — every SundayA full GATE CS paper, exactly 180 minutes, ranked across India with your GATE score.
Practise more on Functions, Parameter Passing, Scope Rules, RecursionTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group