Saturday, August 6, 2011

ZS Associates Freshers placement papers



ZS Associates - One of the top 25 Global managent consultancy firms which has 800plus employees in across 15plus countries.

ZS associates has helped client in over 70plus countries to improve their marketing and sales for more than 25years.





Criteria : 64% and above aggr.

Package : 7 LACS for freshers.

Syllabus to study : C , C++ , java , DBMS , CN and OS i.e. everything


2011 ZS Associates Placement Paper - I:-

1.
main()
{
int i, j;
scanf("%d %d"+scanf("%d %d", &i, &j));
printf("%d %d", i, j);
}

a. Runtime error.
b. 0, 0
c. Compile error
d. the first two values entered by the user


Ans: d) two values entered, 3rd will be null pointer assignment

2.

main()
{
char *p = "hello world";
p[0] = 'H';
printf("%s", p);
}

a. Runtime error.
b. “Hello world”
c. Compile error
d. “hello world”


Ans: b) Hello world

3.
main()
{
char * strA;
char * strB = I am OK;
memcpy( strA, strB, 6);
}

a. Runtime error.
b. I am OK
c. Compile error
d. I am O

Ans: c) I am OK is not in " "


4. How will you print % character?
a. printf(“\%”)
b. printf(“\\%”)
c. printf(“%%”)
d. printf(“\%%”)


Ans: c) printf(" %% ");

5.
const int perplexed = 2;
#define perplexed 3

main()
{
#ifdef perplexed
#undef perplexed
#define perplexed 4
#endif
printf("%d",perplexed);
}

a. 0
b. 2
c. 4
d. none of the above

Ans: c)

6.
struct Foo
{
char *pName;
};

main()
{
struct Foo *obj = malloc(sizeof(struct Foo));
clrscr();
strcpy(obj->pName,"Your Name");
printf("%s", obj->pName);
}

a. Your Name
b. compile error
c. Name
d. Runtime error


Ans a)

7.Identify the recording mode, by which you can record the non-standard object in QTP

A) Standard recording B) Analog recording

C) Low level recording D) None

Ans: B

8. By default, how many no of tables would be there in a script?

a) One b) Two c) Three d) Four

Ans: B

9. The file extension of Shared object repository file is

A .MTR B. .TSR C. .QRS D. None

Ans: B

10. To invoke the function which does not return any value, we can use

a. call function name b. function name

c. Both A & B d. None

Ans: A

11. How many bits are needed within a machine code instruction to select a single register in a machine with 16 general registers?


a. 2 b. 3 c. 4 d. 5

Ans: C

12. which key in any windows screen is used to invoke file menu

Ans :alt+f

13. Object which is used for calling the win32 api functions in QTP, we use

A extern B. description C. environment D. None

Ans: A

14. What is the result of adding the binary numbers 01000001 and 11111111 on an 8 bit machine?

A. 11111111 B. 00000000 C. 01111111 D. Overflow

Ans: D

15. What does 3G denote

a) 3rd generation mobile communication b) 3rd generation computer languages  c) option 3 d) option4

Ans: a

16. An application program that is used by the users to get the information from the backend of some application like databases:

a) application server b) proxy server c) database server d) option 4

Ans: database server

17. What is the result of adding the binary numbers 01000011 and 10010000 on an 8 bit machine?

A. 11010011 B. 11110011 C. 11001011 D. 11010101

Ans: A

18. How is the decimal value for 30 represented in binary?

A. 00001111 B. 00011010 C. 00011110 D. 00011111

Ans: C

19. A memory chip has 8 data lines and 9 address lines. How many bytes can be stored on it?

A. 511 B. 512 C. 500 D. 256

Ans: B

20. Which of the following is not true about the e-mail

a) It can be accessed by a client program using POP
b) It can be accessed by a client program using imap protocol
c) option 3
d) option 4

21 main( )
{
unsigned int i=3;
while( i >=0)
printf( "%d", i--);
}
how many times will the printf statement be executed?
a)0     b)3    c)4    d) infinite

22. In a class, except 18 all are above 50 years. 15 are below 50 years of age. How many people are there

(a) 30
(b) 33
(c) 36
(d) none of these.

Ans. (d)

23. A square plate of some size is cut at four corners. Equal squares of the same size are cut and is formed as open box. If this open box carries 128 ml of oil. What is the size of the side of the plate?

(a) 17
(b) 14
(c) 13
(d) None of these

24. enum number { a= -1, b= 4,c,d,e}
What is the value of e ?
(a) 7
(b) 4
(c) 5
(d) 15
(e) 3

25. The very first process created by the kernal that runs till the kernal process is halts is

a) init
b) getty
c) both (a) and (b)
d) none of these
Ans. (a)



2011 ZS Associates Placement Paper - II:-

1. Output of the following program is
main()
{int i=0;
for(i=0;i<20;i++)
{switch(i)
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default i+=4;
break;}
printf("%d,",i);
}
}

a) 0,5,9,13,17
b) 5,9,13,17
c) 12,17,22
d) 16,21
e) Syntax error
Ans. (d

2. What is the output in the following program
main()
{char c=-64;
int i=-32
unsigned int u =-16;
if(c>i)
{printf("pass1,");
if(c
printf("pass2");
else
printf("Fail2");
}
else
printf("Fail1);
if(i
printf("pass2");
else
printf("Fail2")
}

a) Pass1,Pass2
b) Pass1,Fail2
c) Fail1,Pass2
d) Fail1,Fail2
e) None of these

Ans. (c)

3. In the process table entry for the kernel process, the process id value is
(a) 0
(b) 1
(c) 2
(d) 255
(e) it does not have a process table entry

Ans. (a)

4. Which of the following API is used to hide a window
a) ShowWindow
b) EnableWindow
c) MoveWindow
d) SetWindowPlacement
e) None of the above
Ans. (a)

5. What will the following program do?
void main()
{
int i;
char a[]="String";
char *p="New Sring";
char *Temp;
Temp=a;
a=malloc(strlen(p) + 1);
strcpy(a,p); //Line number:9//
p = malloc(strlen(Temp) + 1);
strcpy(p,Temp);
printf("(%s, %s)",a,p);
free(p);
free(a);
} //Line number 15//

a) Swap contents of p & a and print:(New string, string)
b) Generate compilation error in line number 8
c) Generate compilation error in line number 5
d) Generate compilation error in line number 7
e) Generate compilation error in line number 1

Ans. (b)

6.
struct Foo
{
char *pName;
char *pAddress;
};

main()
{
struct Foo *obj = malloc(sizeof(struct Foo));
clrscr();
obj->pName = malloc(100);
obj->pAddress = malloc(100);

strcpy(obj->pName,"Your Name");
strcpy(obj->pAddress, "Your Address");

free(obj);
printf("%s", obj->pName);
printf("%s", obj->pAddress);
}

a. Your Name, Your Address
b. Your Address, Your Address
c. Your Name Your Name
d. None of the above


Ans: d) printd Nothing, as after free(obj), no memory is there containing
obj->pName & pbj->pAddress

7..
main()
{
char *a = "Hello ";
char *b = "World";
clrscr();
printf("%s", strcat(a,b));
}

a. Hello
b. Hello World
c. HelloWorld
d. None of the above


Ans: b)

8.

main()
{
char *a = "Hello ";
char *b = "World";
clrscr();
printf("%s", strcpy(a,b));
}

a. “Hello”
b. “Hello World”
c. “HelloWorld”
d. None of the above

Ans: d) World, copies World on a, overwrites Hello in a.

9.
void func1(int (*a)[10])
{
printf("Ok it works");
}

void func2(int a[][10])
{
printf("Will this work?");
}

main()
{
int a[10][10];
func1(a);
func2(a);
}

a. Ok it works
b. Will this work?
c. Ok it worksWill this work?
d. None of the above

Ans: c)

10.
main()
{
printf("%d, %d", sizeof('c'), sizeof(100));
}

a. 2, 2
b. 2, 100
c. 4, 100
d. 4, 4

Ans: a) 2, 2

11.
main()
{
int i = 100;
clrscr();
printf("%d", sizeof(sizeof(i)));
}

a. 2
b. 100
c. 4
d. none of the above


Ans: a) 2

12.

main()
{
int c = 5;
printf("%d", main||c);
}

a. 1
b. 5
c. 0
d. none of the above

Ans: a) 1, if we use main|c then error, illegal use of pointer

13. A memory chip has 8 data lines and 9 address lines. How many bytes can be stored on it?

A. 511 B. 512 C. 500 D. 256

Ans: B

14. Which of the following devices requires the highest input data transferrate?

A. mouse B. Keyboard C. Floppy disk D. CD

Ans: D

15. Complete the series:

20, 24, 6, 2, 8, ?

Ans: 12 (as 5.4=20, 20+4=24, 24/4=6, 6-4=2, 2.4=8, 8+4=12).

16.  A farmer has two rectangular fields. The larger field has twice the length and 4 times the width of the smaller field. If the smaller field has area K, then the are of the larger field is greater than the area of the smaller field by what amount?

(a) 6K (b) 8K (c) 12K (d) 7K

17. 2598Successive discounts of 20% and 15% are equal to a single discount of

(a) 30%
(b) 32%
(c) 34%
(d) 35%
(e) 36

Ans . (b)


18. The petrol tank of an automobile can hold g liters.If a liters was removed when the tank was full, what part of the full tank was removed?

(a)g-a
(b)g/a
(c) a/g
(d) (g-a)/a
(e) (g-a)/g

(Ans . (c)


19. If x/y=4 and y is not 0 what % of x is 2x-y

(a)150%
(b)175%
(c)200%
(d)250%

(Ans . (b)

20. A company contracts to paint 3 houses. Mr.Brown can paint a house in 6 days while Mr.Black would take 8 days and Mr.Blue 12 days. After 8 days Mr.Brown goes on vacation and Mr. Black begins to work for a period of 6 days. How many days will it take Mr.Blue to complete the contract?

A. 7
B. 8
C. 11
D. 12

(Ans .C)

21. If a person walks at 4/5th of his usual spee he reaches 40min late. If he walks at his usual speed how much time does he travels.

Ans:160min or 2hr 40min

22. In a class 80% have passed english,70% passed Hindi 10% did not passed either. If 144 students passed both. What is the total strength of the class.

Ans: 240.

23. Find the least number when divided by 7 gives the reminder 6, when divided by 6 gives reminder 5, when divided by 5 gives reminder 4 and so on....

Ans: 419

24 If a man stands in front of sun what is the first letter of the direction which is left to him:

Ans: North(N)

25. After execution of CMP, a instruction in Intel 8085 microprocessor

(a) ZF is set and CY is reset.

(b) ZF is set CY is unchanged

(c) ZF is reset, CY is set

(d) ZF is reset , CY is unchanged .

Ans. A