Code No: A109100106 Set No. 1 JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD I B.Tech.

II Mid Examinations, March – 2011 COMPUTER PROGRAMMING AND DATA STRUCTURES Objective Exam Name: ______________________________ Hall Ticket No. A Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 10. I. 1. Choose the correct alternative struct a {int I; float j; }; Which of the following syntax is correct to declare a structure variable A. struct union a; B. union struct a; C. union a t; [ ]

D. struct a t;

2.

Which of the following is used with printf ( ) function for printing the Address of a variable [ A. %d B. %u C. %f D. %c struct{ int I; flaot j;} s; sizeof (s) will be A. 4 bytes B. 2 bytes [ C. 6 bytes D. 0 bytes

]

3.

]

4.

The process of calling a function using pointers to pass the address of variables is known as [ A. call by argument B. call by parameter C. call by value D. call by reference

]

5.

main( ) {int a=5,b,*c;c=&a;b=*c; printf("\n value of a=%d & b=%d",a,b,)} A. a=3,b=3 B. a=4,b=4 C. a=6,b=6

[

]

D. a=5,b=5 [ ]

6.

main( ) { char *str1="abcd"; char str2[ ]="abcd"; printf ("%d%d%d", sizeof(str1),sizeof(str2),sizeof("abcd")); } A. 2 5 5 B. 5 5 2 C. Compiler error D. 5 2 5 A block of memory is allocated using the function A. falloc( ) B. dalloc( ) C. malloc( )

7.

[ D. calloc( )

]

Cont…..2

4.Code No: A109100105 :2: Set No. FRI. 14. 20. The value Assigned to enum constant FRI is __________ Pointers ________ the execution speed (increased/decrease) Pre Processing statements are started with ________ symbol 19. WED. valid but skip the first value 1 D. SAT}. 16. 5} then A. register C. different location D. 17. MON. extern ] 10. results in compilation error B. Initializes all values of array with 0 Fill in the blanks The standard library function strcmp (“JNTUH”. no location B. static D. -oOo- . TUE=5. The name of the array refers to ___________ address In command line arguments program the first argument of the main function Indicates _________ In enum wd={SUN. 3. 2. no stroage [ ] 9. “JNTUK”) retruns ____________ The general format of realloc function is ___________ [ ] II 11. same location [ C. Which of the following storage classes is used to allocate memory in cpu registers A. C. 13. 12. valid but skip the last value 5. THU. 15. If we declare an array like int a[4] = {1. 18. Structure elements can be accessed through a pointer to a structure using the operator ____________ Self referential structure means __________________ A program obtaining its memory while it is running is called as ___________. 1 8. In union all members use A. auto B.

b=6 [ ] 2. sizeof(str1). I. } A. A Answer All Questions.)} A. ] C. 7.*c. a=3.a. [ ] D. valid but skip the first value 1 D. float j. falloc( ) B. The process of calling a function using pointers to pass the address of variables is known as [ A. printf ("%d%d%d". [ D. C.b. 5 5 2 C. malloc( ) In union all members use A. a=4. 4.Code No: A109100106 Set No. same location 4. Choose the correct alternative 1. Time: 20 Min. 5} then A. auto B. a=5. extern If we declare an array like int a[4] = {1.b. printf("\n value of a=%d & b=%d". Which of the following syntax is correct to declare a structure variable A. 3. All Questions Carry Equal Marks. main( ) { char *str1="abcd". Which of the following storage classes is used to allocate memory in cpu registers A.Tech. a=6. 2 5 5 B.b=4 C. union a t. different location D. 2 JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD I B. register C.b=3 B. calloc( ) [ ] 5. results in compilation error B. call by value D.b=5 [ ] 3. }. II Mid Examinations.c=&a. Compiler error D. static D. Marks: 10.sizeof("abcd")). 5 2 5 A block of memory is allocated using the function A.sizeof(str2). char str2[ ]="abcd". call by argument B. struct union a. dalloc( ) C. ] D. struct a t. 2. Initializes all values of array with 0 struct a {int I. Cont…. union struct a. [ ] 8. no stroage [ ] 6. call by reference main( ) {int a=5. C. March – 2011 COMPUTER PROGRAMMING AND DATA STRUCTURES Objective Exam Name: ______________________________ Hall Ticket No. no location B.2 .b=*c. B. call by parameter C. valid but skip the last value 5.

Code No: A109100106 9. 17. 14. 15. 2 Which of the following is used with printf ( ) function for printing the Address of a variable [ A. THU. FRI. TUE=5. 20. WED. In command line arguments program the first argument of the main function Indicates _________ In enum wd={SUN. The value Assigned to enum constant FRI is __________ Pointers ________ the execution speed (increased/decrease) Pre Processing statements are started with ________ symbol The standard library function strcmp (“JNTUH”. 4 bytes B. 2 bytes Fill in the blanks Self referential structure means __________________ A program obtaining its memory while it is running is called as ___________. 0 bytes ] 10. :2: Set No. %u C. 12. 13. MON. “JNTUK”) retruns ____________ The general format of realloc function is ___________ Structure elements can be accessed through a pointer to a structure using the operator ____________ 16. sizeof (s) will be A. %c struct{ int I. -oOo- . %d B. 18. ] II 11. 6 bytes D. SAT}. 19.} s. flaot j. The name of the array refers to ___________ address [ C. %f D.

register C. 5} then A. Compiler error D.sizeof(str2). 5 5 2 C. If we declare an array like int a[4] = {1. different location D. 0 bytes Cont…. 3. Which of the following syntax is correct to declare a structure variable A. valid but skip the first value 1 D. auto B. %f D. Marks: 10. no location B. results in compilation error B. %c struct{ int I. Initializes all values of array with 0 struct a {int I. }. [ ] D. Which of the following is used with printf ( ) function for printing the Address of a variable [ A. 7. flaot j. 3 JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD I B. struct union a. %u C.Code No: A109100106 Set No. 5 2 5 A block of memory is allocated using the function A. sizeof (s) will be A. 6 bytes D. C. B. 1. A Answer All Questions. %d B. Choose the correct alternative main( ) { char *str1="abcd".Tech. char str2[ ]="abcd". 2 bytes [ C. 4. malloc( ) In union all members use A. 2. falloc( ) B. same location [ D. union struct a.} s. I. All Questions Carry Equal Marks. 4 bytes B. II Mid Examinations. [ ] 6. struct a t.2 ] 8. extern 5. Time: 20 Min. ] . float j. dalloc( ) C. C. 4. no stroage [ ] ] ] 2. sizeof(str1). 2 5 5 B. calloc( ) [ C. union a t.sizeof("abcd")). 3. } A. printf ("%d%d%d". Which of the following storage classes is used to allocate memory in cpu registers A. static D. March – 2011 COMPUTER PROGRAMMING AND DATA STRUCTURES Objective Exam Name: ______________________________ Hall Ticket No. valid but skip the last value 5.

)} A. a=6. The process of calling a function using pointers to pass the address of variables is known as [ A. 12. 14. FRI. call by parameter C. WED. SAT}.c=&a. 19.b.b=*c. -oOo- . “JNTUK”) retruns ____________ The general format of realloc function is ___________ Structure elements can be accessed through a pointer to a structure using the operator ____________ Self referential structure means __________________ A program obtaining its memory while it is running is called as ___________.a. a=4. 18.b=3 B. printf("\n value of a=%d & b=%d". call by reference ] 10. 17. 3 9.b.b=4 C. a=5.b=5 II 11. call by argument B. In command line arguments program the first argument of the main function Indicates _________ In enum wd={SUN. a=3.*c.Code No: A109100106 :2: Set No.b=6 Fill in the blanks The name of the array refers to ___________ address [ ] D. 20. 16. 13. THU. 15. TUE=5. main( ) {int a=5. The value Assigned to enum constant FRI is __________ Pointers ________ the execution speed (increased/decrease) Pre Processing statements are started with ________ symbol The standard library function strcmp (“JNTUH”. MON. call by value D.

Which of the following syntax is correct to declare a structure variable A.a. Choose the correct alternative In union all members use A. II Mid Examinations.2 . Marks: 10.b=4 C. C.} s. extern 3. A Answer All Questions. Which of the following is used with printf ( ) function for printing the Address of a variable [ A. 4. float j. results in compilation error B. %f D. All Questions Carry Equal Marks. union struct a. struct a t. printf("\n value of a=%d & b=%d". auto B. union a t.Code No: A109100106 Set No. static D.b=5 Cont…. register C.b=3 B. %u C. If we declare an array like int a[4] = {1. a=6. call by value D. call by reference ] 8. valid but skip the last value 5.b. The process of calling a function using pointers to pass the address of variables is known as [ A. sizeof (s) will be A. ] 7. 1. no location B. no stroage [ ] ] 2. C. %c struct{ int I. flaot j. same location [ C. valid but skip the first value 1 D. %d B. [ ] D. 5} then A.)} A. 2 bytes [ C. 3.*c. Which of the following storage classes is used to allocate memory in cpu registers A. 5.b=*c. a=5. call by argument B. struct union a. 0 bytes ] 6.c=&a.b=6 [ ] D. 4 bytes B. }.b. 2. 6 bytes D.Tech. March – 2011 COMPUTER PROGRAMMING AND DATA STRUCTURES Objective Exam Name: ______________________________ Hall Ticket No. Time: 20 Min. I. 4 JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD I B. B. call by parameter C. different location D. a=4. a=3. main( ) {int a=5. Initializes all values of array with 0 struct a {int I. [ ] 4.

dalloc( ) C. II 11.sizeof("abcd")). 4 9. TUE=5. 15. The name of the array refers to ___________ address In command line arguments program the first argument of the main function Indicates _________ [ D. sizeof(str1). malloc( ) Fill in the blanks In enum wd={SUN. MON. char str2[ ]="abcd". 16. falloc( ) B. 2 5 5 B. printf ("%d%d%d". -oOo- .sizeof(str2). Compiler error D. 5 5 2 C. 14. The value Assigned to enum constant FRI is __________ Pointers ________ the execution speed (increased/decrease) Pre Processing statements are started with ________ symbol The standard library function strcmp (“JNTUH”. 17. 13. 5 2 5 A block of memory is allocated using the function A. 20. 18. SAT}.Code No: A109100106 :2: Set No. WED. } A. “JNTUK”) retruns ____________ The general format of realloc function is ___________ Structure elements can be accessed through a pointer to a structure using the operator ____________ Self referential structure means __________________ A program obtaining its memory while it is running is called as ___________. FRI. 12. calloc( ) ] 10. main( ) { char *str1="abcd". 19. THU.