iGate Previous Years Solved Sample Placement Papers
-
find(int x,int y) { return ((x call find(a,find(a,b)) use to find
(a) maximum of a,b
(b) minimum of a,b
(c) positive difference of a,b
(d) sum of a,b (Ans)
-
Integer needs 2 bytes, maximum value of an unsigned integer is
(a) {2 power 16}-1 (Ans)
(b) {2 power 15}-1
(c) {2 power 16}
(d) {2 power 15}
-
y is of integer type then expression 3*(y-8)/9 and (y-8)/9*3 yields same value if
(a) must yield same value (Ans)
(b) must yield different value
(c) may or may not yield same value
(d) none of the above
-
5-2-3*5-2 will give 18 if
(a) - is left associative, * has precedence over - (Ans)
(b) - is right associative, * has precedence over -
(c) - is right associative, - has precedence over *
(d) - is left associative, - has precedence over *
-
printf("%f", 9/5); prints
(a) 1.8
(b) 1.0
(c) 2.0
(d) none (Ans)
-
if (a=7) printf(" a is 7 "); else printf("a is not 7"); prints
(a) a is 7 (Ans)
(b) a is not 7
(c) nothing
(d) garbage
-
if (a>b) if (b>c) s1; else s2; s2 will be executed if
(a) a <= b
(b) b > c
(c) b <= c and a <= b
(d) a > b and b <= c (Ans)
-
main() { inc(); inc(); inc(); } inc() { static int x; printf("%d", ++x); } prints
(a) 012
(b) 123 (Ans)
(c) 3 consecutive unpredictable numbers
(d) 111
-
Preprocessing is done
(a) either before or at beginning of compilation process (Ans)
(b) after compilation before execution
(c) after loading
(d) none of the above
-
printf("%d", sizeof("")); prints
(a) error
(b) 0
(c) garbage
(d) 1 (Ans)
-
main() { int a = 5, b = 2; printf("%d", a+++b); }
(a) results in syntax
(b) print 7 (Ans)
(c) print 8
(d) none
-
Process by which one bit pattern is transformed into another by bitwise operation is
(a) masking (Ans)
(b) pruning
(c) biting
(d) chopping
-
Value of an automatic variable that is declared but not initialized will be
(a) 0
(b) -1
(c) unpredictable (Ans)
(d) none
-
int v = 3, *pv = &v; printf("%d %d", v, *pv); output will be
(a) error
(b) 3 address of v
(c) 3 3 (Ans)
(d) none