1
GATE CSE 2002
MCQ (Single Correct Answer)
+2
-0.6
Consider the following declaration of a two-dimensional array in C:

char a[100][100];

Assuming that the main memory is byte-addressable and that the array is stored starting from memory address 0, the address of a[40][50] is
A
4040
B
4050
C
5040
D
5050
2
GATE CSE 2000
MCQ (Single Correct Answer)
+2
-0.6
The value of j at the end of the execution of the following C program
int incr (int i)
{
     static int count = 0;
     count = count + i;
     return (count);
}
main () {
   int i,j;
   for (i = 0; i <= 4; i++)
   j = incr(i);
}
is
A
10
B
4
C
6
D
7
3
GATE CSE 1999
MCQ (Single Correct Answer)
+2
-0.6
Consider the following C function definition
int Trial (int a, int b, int c)
{
       if ((a > = b) && (c < b)) return b;
       else if (a > = b) return Trial (a,c,b);
       else return Trial (b,a,c);
}
The function Trial:
A
Finds the maximum of a, b and c
B
Finds the minimum of a, b and c
C
Finds the middle number of a, b, c
D
None of the above
4
GATE CSE 1998
MCQ (Single Correct Answer)
+2
-0.6
What is the result of the following program?
program side-effect (input, output);
var x, result: integer:
fucntion f (var x:integer):integer;
begin
    x:x+1;f:=x;
end
begin
    x:=5
    result:=f(x)*f(x)
    writeln(result)
end
A
5
B
25
C
36
D
42
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12