GATE CS 2019 — Question 12
Consider the following C program:#include <stdio.h> int jumble(int x, int y) { x = 2 * x + y; return x; } int main() { int x =…
Subject-wise GATE questions
12 questions and papers
Consider the following C program:#include <stdio.h> int jumble(int x, int y) { x = 2 * x + y; return x; } int main() { int x =…
Consider the following C program:#include <stdio.h> struct Ournode { char x, y, z; }; int main() { struct Ournode p = {'1', '0', 'a' + 2}; struct Ournode…
Consider the following C program:void f(int, short); void main() { int i = 100; short s = 12; short *p = &s; __________ ; /* call to f()…
Consider the following C program:#include <stdio.h> int *A, stkTop; int stkFunc(int opcode, int val) { static int size = 0, stkTop = 0; switch (opcode) { case -1:…
Consider a max-heap stored in an array using the usual level-order (breadth-first) representation:40, 30, 20, 10, 15, 16, 17, 8, 4The value 35 is now inserted into this…
Consider the following function written in C:int f(int n) { static int i = 1; if (n >= 5) return n; n = n + i; i++; return…
Consider the following function:int f(int n) { static int r = 0; if (n <= 0) return 1; if (n > 3) { r = n; return f(n…
The following C function takes a singly linked list as an input argument. It modifies the list by moving the last element to the front of the list…
The following postfix expression with single-digit operands is evaluated using a stack:8 2 3 ^ / 2 3 * + 5 1 * -Note that ^ is the…
The maximum number of binary trees that can be formed with three unlabelled nodes is:
Every question here is free to read. A free account adds the verified key, the worked solution and your progress.