1
GATE CSE 2003
MCQ (Single Correct Answer)
+1
-0.3
Which of the following statements is FALSE?
A
In statically typed languages, each variable in a program has a fixed type
B
In un-typed languages, values do not have any types
C
In dynamically typed languages, variables have no types
D
In all statically typed languages, each variable in a program is associated with values of only a single type during the execution of the program
2
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
The following program fragment is written in a programming language that allows global variables and does not allow nested declarations of functions.
global int i = 100, j = 5;
void P(x) {
    int i = 10;
    print(x + 10);
    i = 200;
    j = 20;
    print (x);
}
main() {
    P(i + j);
}
If the programming language uses dynamic scoping and call by name parameter passing mechanism, the values printed by the above program are
A
115, 220
B
25, 220
C
25, 15
D
115, 105
3
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
The following program fragment is written in a programming language that allows global variables and does not allow nested declarations of functions.
global int i = 100, j = 5;
void P(x) {
    int i = 10;
    print(x + 10);
    i = 200;
    j = 20;
    print (x);
}
main() {
    P(i + j);
}
If the programming language uses static scoping and call by need parameter passing mechanism, the values printed by the above program are
A
115, 220
B
25, 220
C
25, 15
D
115, 105
4
GATE CSE 2003
MCQ (Single Correct Answer)
+1
-0.3
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++) {
         p *= x/i;
         s+=p;
    }
return s;
}
For large values of y, the return value of the function f best approximates
A
Xy
B
ex
C
$$\ln (1 + x)$$
D
Xx
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12