Samsung placement paper

Posted by The Modern Buddha , Tuesday, August 2 19:28

Dated : 1st of August,2011.

There were two rounds - 1)a 30 min Technical paper based on C and C++ with 16 ques
2)a 60 min Aptitude paper with 2 sections(Logical Reasoning and Quantitative aptitude) with 50 ques.

1st round(Technical paper) :

1. If integer needs two bytes of storage, then maximum value of an unsigned integer is

a. 2^16-1

b. 2^15-1

c. 2^16

d. 2^15

2. If integer needs two bytes of storage, then maximum value of a signed integer is

a. 2^16-1

b. 2^15-1

c. 2^16

d. 2^15

3. What is the output of

printf (“%d”, printf(“tim”) );

a. results in a syntax error

b. outputs tim3

c. outputs garbage

d. prints tim and terminates abruptly

4. Length of string “correct” is




d. implementation dependant

5. Consider the following program fragment

char c= ‘a’;
while(c++ <= ‘z’)

If the required output is abcd…wxyz, then xxx should be 
a. c 
b. c++ 
c. c-1 
d. --c 

6. Consider the function
find(int x, int y) 
return ((x< y ?0:x )?>;

The call find (a, find (a, b) ) can be used to find

a. maximum of a, b

b. positive difference of a, b

c. sum of a, b

d. minimum of a, b

7. If abc is the input, then the following program fragment

char x, y, z;
printf(“%d”,scanf(“%c%c%c”, &x, &y, &z));
results in

a. a syntax error

b. a fatal error

c. segmentation violation

d. printing of 3

8. Consider the statements

If ab is the input, the output will be error message

b. this can’t be input

c. ab

d. a b

9. The operators  ., ||, <, = if arranged in the ascending order of 
a. . , || , < , = 
b. =, < , || ,
c. =, || , <, . 
d. <, || , = , .
10. In the following program fragment 
unsigned i=-1;
int j = -4 printf(“%u”, i+j); 
a. garbage 
b. -3 
c. an integer that changes from machine to machine 
d. none of the above 

11. The following program fragment 
for( i=3; i<15;i+=3); 
results in 
a. a syntax error 
b. an execution error 
c. printing of 12 
d. printing of 15 

12. The following description of the program, please pick the wrong one? 
int main(void) 
int i= 100; 
int**dpi = π 
a. dpi to store a pointer with the address for pi is a double pointer 
b. (*pi==i) is true. 
c. (*pi== **dpi)is true. 
d. (*dpi == 100) is true 

13. Below, please find the results for the program do? 
int counter = 0, i; 
if (i < 100) continue; 
counter ++; 
if (counter == 100) break; 
printf(%d%d”,i, counter);

a.199 100 
b. 200 100 
c. 199 99 
d. 200 0  

14. See below for a description of the defined array, please choose the
wrong thing ?

int a [] = {10,20,30,40};

a. successive one-dimensional array of elements in the array a[1], a[2] is located in the contiguous memory space.

b. a[1] and a* (a+1) is the same.

c. During the initialization of an array; array size must be specified
otherwise the initial value at compile error occurs

d. & a[1] which has a +1 value, such as the address

0 Response to "Samsung placement paper"

Post a Comment