Arrays,pointers

2
Code No: A109100106 Set No. 1 JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD I B.Tech. II Mid-Term Examinations, February – 2012 COMPUTER PROGRAMMING AND DATA STRUCTURES Objective Exam Name: ______________________________ Hall Ticket No. Answer All Questions. All Questions Carry Equal Marks.Time: 20 Min. Marks: 10. I Choose the correct alternative: 1. Which one of the following indicates that the function returns nothing [B ] (A) main() (B) Void (C) function() (D) All 2. Which one of the following cannot be de-referenced [ C ] (A) typedef * (B) int * (C) void * (D) All 3. What is the Standard Header File for the function ‘abs()’ [C ] (A) ctype.h (B) stdlib.h (C) math.h (D) None 4. Given data : char string1[] = "first";then string1[ 3 ]=? [B ] (A) r (B) s (C ) i (D) None 5. Function prototype scope is Used for identifiers in [ D ] (A) parameter list (B) Blocks (C) Arrays (D)All 6. The value of a pointer is the address of the corresponding object or function [C ] (A) special value&function (B) address&object (C) address&constant (D) None 7. If Strings are used as ‘int strcmp(char const *s1, char const *s2);’then how will you get return value less than zero [ B ] (A) if s1 and s2 are equal; (B) if s1 precedes s2 in lexicographical order; (C) if s1 follows s2 (D) None 8. Communicating information between functions is possible from [A ] (A) modules (B) Parameters (C) variables (D) None 9. What is the Standard Header File for the function ‘tolower()’ [ C ] (A) stdlib.h (B) string.h (C) ctype.h (D) stdio.h 10. Where do you get more Performance [ A ] (A) Iteration (B) Recursion (C) Both A&B (D) None Cont…..2 A www.jntuworld.com

description

computer programming

Transcript of Arrays,pointers

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

I B.Tech. II Mid-Term Examinations, February – 2012 COMPUTER PROGRAMMING AND DATA STRUCTURES

Objective Exam Name: ______________________________ Hall Ticket No.

Answer All Questions. All Questions Carry Equal Marks.Time: 20 Min. Marks: 10.

I Choose the correct alternative: 1. Which one of the following indicates that the function returns nothing [B ] (A) main() (B) Void (C) function() (D) All 2. Which one of the following cannot be de-referenced [ C ]

(A) typedef * (B) int * (C) void * (D) All 3. What is the Standard Header File for the function ‘abs()’ [C ]

(A) ctype.h (B) stdlib.h (C) math.h (D) None 4. Given data : char string1[] = "first";then string1[ 3 ]=? [B ] (A) r (B) s (C ) i (D) None 5. Function prototype scope is Used for identifiers in [ D ] (A) parameter list (B) Blocks (C) Arrays (D)All 6. The value of a pointer is the address of the corresponding object or function [C ]

(A) special value&function (B) address&object (C) address&constant (D) None 7. If Strings are used as ‘int strcmp(char const *s1, char const *s2);’then how will you get return

value less than zero [ B ] (A) if s1 and s2 are equal; (B) if s1 precedes s2 in lexicographical order; (C) if s1 follows s2 (D) None

8. Communicating information between functions is possible from [A ]

(A) modules (B) Parameters (C) variables (D) None 9. What is the Standard Header File for the function ‘tolower()’ [ C ]

(A) stdlib.h (B) string.h (C) ctype.h (D) stdio.h 10. Where do you get more Performance [ A ] (A) Iteration (B) Recursion (C) Both A&B (D) None Cont…..2

A

www.jntuworld.com

www.jwjobs.net

Code No: A109100106 :2: Set No. 1 II Fill in the Blanks 11. Find out pow(2.5,3) = ______________ [Ans:15.625] 12. An unspecified return-value-type is always assumed by the compiler to be _____ [Ans:void] 13. Names in different enumerations must always be _________ 14. _______________programming evolved in the 1970s [Ans: c] 15. All _____________functions return data type double [Ans;mathematical] 16. A ________pointer points to a heap-dynamic variable that has been de-allocated.[Ans:dangling ] 17. _____________header files Create file with functions 18. Often, typedef is used in combination with _______________to declare a synonym (or an alias) for

a structure 19. Program exits prematurely is caused by _______error 20. C___________________ is used to insert common definitions into source files -oOo-

www.jntuwo www.jt