Zenith Placement Paper |   3246

Zenith Placement Paper

Zenith Latest Placement Paper

Zenith Technical Questions

1.What is the meaning memory allocation and why we use it ?

2.What is the meaning of physical memory and virtual memory ?

3 .What are the 3Ms of production ?

4.What does 6 Sigma represent ?

5.What is a register ?

6.llocating memory at runtime is also call as _____ ?

7.What is static and dynamic memory allocation ?

8.What is virtual memory ?

9. main()
{ int I=3;
while(I--)
{int I=100;
I--;
Printf(“%d”, I);
}
}
find output?
100 99 98 99 98 97 99 99 99 error 

Ans:-  99 99 99

10. main()
{char ch;
for(ch=’0’;ch<=255;ch++)
printf(“%c”, ch);
}
Ans : infinite loop

11. some program using variable b which was not initialized so

Ans:- error


12. main()

{

int i=3;

while (i--- )

{

int i=100;

i----;

printf(“%d”, i);

}

}

a) 99 99 99 b)2 2 2 c) error d) none of the above

2.Size of which data type is same irrespective of operating system.

a) char *  b) char  c) int  d) float

13. main()

{

unsigned char c;

for (c=0; c!=256; c+)

printf(“%d”, c);

}

14. What is the output of the following program?

#define SQR(x) (x*x)
main()
{
int a,b=3;
a= SQR(b+2);
printf("%d",a);
}
a) 25 b) 11 c) error d) garbage value

15. In which line of the following, an error would be reported?

1. #define CIRCUM(R) (3.14*R*R);
2. main()
3. {
4. float r=1.0,c;
5. c= CIRCUM(r);
6. printf("\n%f",c);
7. if(CIRCUM(r))==6.28)
8. printf("\nGobbledygook");
9. }

a) line 1 b) line 5 c) line 6 d) line 7

16. What is the type of the variable b in the following declaration?

#define FLOATPTR float*
FLOATPTR a,b;
a) float b) float pointer c) int d) int pointer

17. In the following code;
#include<stdio.h>
main()
{
FILE *fp;
fp= fopen("trial","r");
}
fp points to:
a) The first character in the file.
b) A structure which contains a "char" pointer which points to the first character in the file.
c) The name of the file. d) None of the above.

18. What is the difference between the following declarations?

const char *s;
char const *s;
Ans. No difference

19. What would be the output of the following program?

main()
{
char near * near *ptr1;
char near * far *ptr2;
char near * huge *ptr3;
printf("%d %d %d",sizeof(ptr1),sizeof(ptr2),sizeof(ptr3));
}
a) 1 1 1 b) 1 2 4 c) 2 4 4 d) 4 4 4

20. If the following program (myprog) is run from the command line as myprog friday tuesday sunday? What would be the output?

main(int argc, char*argv[])
{
printf("%c",**++argv);
}
a) m b) f c) myprog d) friday

 

feedback