1
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+2
-0.6
Consider the following pseudo code, where x and y are positive integers.
begin
q := 0
r := x
while r ≥ y do
begin
r := r - y
q := q + 1
end
end
The post condition that needs to be satisfied after the program terminates is2
GATE CSE 2014 Set 2
Numerical
+2
-0
Consider the following function
double f (double x) {
if ( abs (x * x – 3) < 0. 01) return x;
else return f (x / 2 + 1.5/x);
}
Give a value q (to 2 decimals) such that f(q) will return q:______.Your input ____
3
GATE CSE 2014 Set 2
MCQ (Single Correct Answer)
+2
-0.6
Consider the C function given below.
int f(int j)
{
static int i = 50;
int k;
if (i == j)
{
printf("something");
k = f(i);
return 0;
}
else return 0;
}
Which one of the following is TRUE?4
GATE CSE 2013
MCQ (Single Correct Answer)
+2
-0.6
What is the return value of f (p, p), if the value of p is initialized to 5 before the call? Note that
the first parameter is passed by reference, whereas the second parameter is passed by value.
int f (int &x, int c) {
c = c - 1;
if (c==0) return 1;
x = x + 1;
return f(x,c) * x;
}
Questions Asked from Basic of Programming Language (Marks 2)
Number in Brackets after Paper Indicates No. of Questions
GATE CSE 2024 Set 2 (1)
GATE CSE 2023 (1)
GATE CSE 2022 (1)
GATE CSE 2015 Set 1 (1)
GATE CSE 2014 Set 2 (2)
GATE CSE 2013 (1)
GATE CSE 2008 (1)
GATE CSE 2003 (2)
GATE CSE 2001 (2)
GATE CSE 1999 (3)
GATE CSE 1998 (1)
GATE CSE 1997 (1)
GATE CSE 1996 (1)
GATE CSE 1994 (1)
GATE CSE 1990 (2)
GATE CSE 1989 (2)
GATE CSE Subjects
Theory of Computation
Operating Systems
Algorithms
Database Management System
Data Structures
Computer Networks
Software Engineering
Compiler Design
Web Technologies
General Aptitude
Discrete Mathematics
Programming Languages