1
GATE CSE 2023
MCQ (Single Correct Answer)
+2
-0.67
Consider the following program:
int main ( ) { f1( ); f2(2); f3( ); return (0); } |
int f1( ) { return (1); } |
int f2 (int X) { f3( ); if (X==1) return f1 ( ); else return (X*f2(X$$-$$1)); } |
int f3( ) { return (5); } |
Which one of the following options represents the activation tree corresponding to the main function?
2
GATE CSE 2022
MCQ (Single Correct Answer)
+2
-0.67
What is printed by the following ANSI C program?
#include <stdio.h>
int main(int argc, char *argv[]) {
char a = 'P';
char b = 'x';
char c = (a & b) + '*';
char d = (a | b) - '-';
char e = (a ^ b) + '+';
printf("%c %c %c\n", c, d, e);
return 0;
}
ASCII encoding for relevant characters is given below :
3
GATE CSE 2019
Numerical
+2
-0
Consider the following C program :
#include <stdio.h>
int main(){
float sum = 0.0, j = 1.0, i = 2.0;
while (i/j > 0.0625){
j = j + j;
sum = sum + i/j;
printf("%f\n", sum);
}
return 0;
}
The number of times the variable sum will be printed, when the above program is executed, is _________.
Your input ____
4
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 isQuestions 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 2019 (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