GATE CS 2019 — Question 12

Numerical answer 1 mark Question 12 2019

Question 12

NAT 1 marks · no negative Programming and Data Structures

Consider the following C program:

#include <stdio.h>

int jumble(int x, int y) {
    x = 2 * x + y;
    return x;
}

int main() {
    int x = 2, y = 5;
    y = jumble(y, x);
    x = jumble(y, x);
    printf("%d\n", x);
    return 0;
}

The value printed by the program is ______.

Answers and explanations are free — they just need an account.

Where this question comes from

Source: GATE 2019 Computer Science and Information Technology, Q12 (question number approximate)