iGate Previous Years Solved Sample Placement Papers
-
Print sizeof(s)and sizeof(u) if sizeof(int)=4 and sizeof(long)=4
(a) sizeof(s)=8, sizeof(u)=8 (Ans)
(b) sizeof(s)=4, sizeof(u)=8
(c) sizeof(s)=8, sizeof(u)=4
(d) sizeof(s)=4, sizeof(u)=4
-
Output of i after executing the program
(a) 1
(b) 2
(c) 3
(d) none (Ans)
-
char S;
char S[6]= " HELLO";
printf("%s ",S[6]);
output of the above program ?
(a) 0
(b) ASCII 0
(c) I
(d) unpredictable (Ans)
-
Unsigned char c;
for ( c=0;c!=256;c++2)
printf("%d",c);
No. of times the loop is executed ?
(a) 127
(b) 128
(c) 256
(d) infinitely (Ans)
-
int i;
i=0;
repeat
i=i+1; <====== PASCAL PROGRAM
print i;
until(i<10)
end
No. of times the loop is executed?
(a) 0
(b) 1
(c) 10
(d) indefinitely (Ans)
-
Convert (int A,var ,int B;int c)
{
A=10;
B=4-;
C=120;
}
Convert (inta,b,c)
{ <====== PASCAL PROGRAM
a=1;
b=4;
c=12;
}convert (
A,B,c) ?
(10,40,120
10,40,12,..........,............)
(a) 10,40,120 (Ans)
(b) 10,40,12
(c) 10,4,0
(d) none of the above
-
Procedure A
Begin
--------
end <====== PASCAL PROGRAM
Procedure B No. Of errors in the program ?
(a) 1
(b) 2
(c) 3
(d) none (Ans)
-
Output of the program ?
(a) 4
(b) 3
(c) unpredictable (Ans)
(d) none
-
int a, *b = &a, **c = &b; ... a = 4; **c = 5;
What happens?(a) Does not change value of a
(b) Assign address of c to a
(c) Assign value of b to a
(d) Assign 5 to a. (Ans)
main() { printf("%u", main()); }What happens?
(a) Prints garbage.
(b) Execution error.
(c) Prints starting address of function main. (Ans)
(d) Infinite loop.