NEW
New Website Launch
Experience the best way to solve previous year questions with mock tests (very detailed analysis), bookmark your favourite questions, practice etc...
VISIT NOW

GATE CSE

Function and Recursion

Programming Languages

Previous Years Questions

Marks 1

More
What is printed by the following ANSI C program? #include <stdio.h> int main(int argc, char *argv[ ]) { ...
GATE CSE 2022
Consider the following C program: #include < stdio.h > int jumble (int x, int y) { ...
GATE CSE 2019
Consider the following C program: #include < stdio.h > int counter = 0; int calc (int a, int b) { int c; c...
GATE CSE 2018
Consider the following C program segment. #include < stdio.h > int main() { char s1[7] = "1234", *p; p = s...
GATE CSE 2015 Set 3
Consider the following function written in the C programming language. void foo(char *a){ if ( *a && *a != ' ')...
GATE CSE 2015 Set 2
What will be the output of the following C program segment? Char inchar = 'A'; Switch ( inchar ) { case 'A' : printf ("C...
GATE CSE 2012
Which one of the following are essential features of an object-oriented programming language? i) Abstraction and encapsu...
GATE CSE 2005
An Abstract Data Type (ADT) is
GATE CSE 2005
Consider the following C function. float f,(float x, int y) { float p, s; int i; for (s=1,p=1,i=1; i < y; i++...
GATE CSE 2003
In the C language
GATE CSE 2002

Marks 2

More
Consider the following ANSI C function: int SimpleFunction (int y[], int n, int x) { int total = y[0], loopIndex; fo...
GATE CSE 2021 Set 1
Consider the following ANSI C program. #include <stdio.h> int main( ) { int i, j, count; count = 0; i = 0; f...
GATE CSE 2021 Set 1
Consider the following C functions. int fun1 (int n) { static int i = 0; if (n > 0) { ++i; ...
GATE CSE 2020
Consider the following C functions. int tob(int b, int* arr) { int i; for (i=0; b>0; i++) { if (...
GATE CSE 2020
Consider the following C code. Assume that unsigned long int type length is 64 bits. unsigned long int fun(unsigned long...
GATE CSE 2018
Consider the C program below. #include < stdio.h > int *A, stkTop; int stkFunc(int opcode, int val) { static ...
GATE CSE 2015 Set 2
Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures p...
GATE CSE 2012
Consider the following recursive C function that takes two arguments: unsigned int foo (unsigned int n, unsigned int r) ...
GATE CSE 2011
Consider the following recursive C function that takes two arguments: unsigned int foo (unsigned int n, unsigned int r) ...
GATE CSE 2011
Choose the correct option to fill ? 1 and ? 2 so that the program below prints an input string in reverse order. Assume ...
GATE CSE 2008
Consider the following C function: int f(int n) { static int r = 0; if(n <= 0) return 1; if(n>3) { ...
GATE CSE 2007
Consider the following C program: double foo(double); /* Line 1 */ int main () { double da, db; //input da db = fo...
GATE CSE 2005
Consider the following C program: void foo (int n, int sum) { int k = 0, j = 0; if(n==0) return; k=n%10; j = n /10...
GATE CSE 2005
Consider the following C program main ( ) { int x, y, m, n; scanf("%d %d", &x, &y); /* Assume x > 0 an...
GATE CSE 2004
Consider the following C function: int f(int n) { static int i = 1; if(n>=5) return n; n = n+1; i++; return f(n); } T...
GATE CSE 2004
Consider the following class definitions in a hypothetical Object Oriented language that supports inheritance and uses d...
GATE CSE 2003
Consider the following declaration of a two-dimensional array in C: char a[100][100]; Assuming that the main memory is b...
GATE CSE 2002
The value of j at the end of the execution of the following C program int incr (int i) { static int count = 0; ...
GATE CSE 2000
Consider the following C function definition int Trial (int a, int b, int c) { if ((a > = b) && (c &lt...
GATE CSE 1999
What value would the following function return for the input x = 95? Function fun (x:integer):integer; Begin If x &...
GATE CSE 1998
What is the result of the following program? program side-effect (input, output); var x, result: integer: fucntion f (va...
GATE CSE 1998
What is the value of X printed by the following program? program COMPUTE (input, output); var X:integer; procedure F...
GATE CSE 1995
What does the following code do? var a, b : integer; begin a:=a+b; b:=a-b; a:=a-b; end;...
GATE CSE 1993

Joint Entrance Examination

JEE Main JEE Advanced WB JEE

Graduate Aptitude Test in Engineering

GATE CSE GATE ECE GATE EE GATE ME GATE CE GATE PI GATE IN

Medical

NEET

CBSE

Class 12