Global Edge Technical Paper
Global Edge Technical Paper
Ltd
Campus-Connect, a division of CareerNet Consulting is a pioneering concept aimed at providing solutions for strengthening industry-academia landscape. We are presently working with over 75 leading IT & KPO organizations and have a strong presence in more than 100 top engineering campuses across India. We have provided extensive career counseling and career guidance to over 80,000 students and have had success in placement of over 2000 students in hi-tech companies in last 3 years. Our services also include research, constituting corporate scholarships, managing relationships, career placements and internship. ____________________________________________________________________________________________ Company Name: Global Edge
3. Output of the code? int main () { char a [] = "world"; printf ("%d %d\n", strlen (a), sizeof (a)); return 0; }
4. What is the output generated? main () { char *s = "Hello"; printf ("%s", 1(s)); } a. Hello b. ello c. e d. None of these.
5. Interpret the given declaration char (* (f ( )) [ ]) ( ) a. f is a pointer to function returning char b. f is a pointer to an array of function returning a char c. Invalid declaration d. f is a function returning pointer to array [] of pointer to function returning char.
7. Thrashing is a. Flooding of pages in the memory. b. Increase in removal of pages from memory. c. Increase in page faults leading to decrease in CPU utilization. d. Removal of unused pages from memory making space for new ones.
8. Recursive Descent parser is a type of a. Bottom up parser. b. Top Down parser. c. None of these. d. Bottom down parser.
9. alloc () allocates memory from a. Heap. b. Reserved memory. c. Data segment. d. Stack.
11. main () {int i; i= (2, 3); printf ("%d", i); } a. 2 b. 3 c. Compiler error d. Syntax error
12. main () { char str [] ="GESL"; printf ("%d %d", sizeof (str), strlen (str)); } a. 5, 5 b. 4, 4 c. 5, 4 d. 4, 5
13. main () { for (i=0; i++; i<100) printf ("hello world\n"); } a. 100 times b. 0 times c. Infinite loop d. None of the above.
14. main () { for (i=1; i++; i<100) printf ("hello world\n"); } a. 100 times b. 0 times c. Infinite loop d. None of the above.
15. main () {
16. main () { int k=5; for (++k<5 && k++/5 || ++k<8); printf ("%d\n", k); } a. 5 b. 6 c. 7 d. 8 17. main () { int *ptr1,*ptr2; ptr1= (int *) malloc (sizeof (int)); ptr2=func (20, 10, ptr1); printf ("%d %d\n",*ptr1,*ptr2);
18. int main () { int i = 10, j; if ((j = ~i) < i) printf (True); else printf (False); } a. True b. False c. Compiler Dependent
19. How many bytes are required to create a 3*3 matrix using double pointer
20. take int=4, float=8, char=1 main () { FILE *fp; printf ("%d\n", sizeof (fp)); } a. 2 b. 4 c. Compiler dependent d. Error
21. main () { int a=10, 20; a^=b^=a^=b; printf ("%d\n %d\n", a, b); a. a=20, b=10 b. a=10,b=20 c. Syntax error
22. main () { int i=10; switch (i) { case 10: printf ("Hello "); { case 1: printf ("World "); } case 5: printf ("Hello World "); } } a. Hello b. Hello c. Hello World Hello World d. Syntax Error.
24. main () { # include <stdio.h> int i = 10; printf ("%d\n", i/2); } a. 10 b. 5 c. error d. Warning