Sie sind auf Seite 1von 8

P.S.G.

R KRISHNAMMAL COLLEGE FOR WOMEN


AN AUTONOMOUS INSTITUTION - AFFILIATED TO BHARATHIAR UNIVERSITY) (ACCREDITED WITH FIVE STAR STATUS BY NAAC)

An ISO 9001:2000 Certified Institution


PEELAMEDU, COIMBATORE 641004

Question bank
III B.Sc. PHYSICS - V SEMESTER A.O.S. - I PROGRAMMING IN C SUBJECT CODE: PS05E01 1. 1. C language has been developed by a) Ken Thompson b) Dennis Ritchie c) Peter Norton d) Martin Richards 2. C language has been developed at a) Microsoft corp. USA b) AT&T Bell labs, USA c) Borland international USA d) IBM USA 3. C language came into existence in the year a) 1971 b) 1957 c) 1972 d) 1983 4. C is a a) b) c) d) Middle level language High level language Low level language None of the above

5. C can be used on a) only MS-DOS operating system b) only UNIX operating system c) only Xenix operating system d) all the above 6. The real constants in C can be expressed in which of the following form a) fractional form only b) exponential form only c) ASCII form only d) Both fractional and exponential forms 7. A character variable can at a time store a) 1 character b) 8 character c) 254 characters d) none of the above 8. The maximum value that an integer constant can have is a) 32767 b) 32767

c) 1.7014e+38

d) -1.7014e+38

9. The width of a C variable name can be a)6 characters b) 10 characters c) 8 characters d) 20 characters 10. A C variable cannot start with a) an alphabet b) a number b) a special symbol d) Both B & C above 11. If a is an integer variable, a=5/2 will return a value a) 2.5 b) 3 c) 2 d)0 12. If a is an integer variable, a = 5 %2 will return a value a) 2.5 b) 3 c) 1 d)0 13. Every line in a C program should end with a_______ a) colon b) semicolon c) period d) comma 14. Which of the following is a valid variable name a) 123 b) T_price c) % d) 25th 15. Hierarchy decides which operator a)is most important b) is used first c) is fastest d) operates on largest numbers 16.A compiler translates a a) high level language program into object program b) machine level language program into high level language program c) program in machine language into an assembly language d) low level language program into high level program 17.An assembler converts a) the source program to an object program b) program in machine language to program in assembly language c) program in machine language to program in high level language d) program in high level language to program into an object program 18. A is a _____ a) single character constant b) string constant c) variable d) none of the above 19. A is a_________ a)single character constant b) string constant c) variable d) none of the above

20. every statement should end with a ________ a) semicolon b) colon c) comma d) period 21.The decision making statements are also known as __________ statements a) control b) branching c) looping 22. The control structure in c programming include ________ a) sequence b)selection c) iteration d) all the above 23. When one of the operand is real and the other is integer, the expression is called _______ expression a) real arithmetic b) integer arithmetic c) mixed mode arithmetic d) none of the above 24. && represents ____ operator a) logical AND b) logical OR c) logical NOT d) relational operator 25. || represents ____ operator a) logical AND b) logical OR c) logical NOT d) relational operator 26. ! represents ____ operator a) logical AND b) logical OR c) logical NOT d) relational operator 27. Find the value of the expression x=a-b/3 +c*2-1 if a=9 b=12 c=3 a) 10 b) 9 c)8 d)12 28. An expression that combines two or more relational expressions is termed as _____ expression a) logical b) relational c) arithmetic d) none of the above 29. The _____ operator returns the number of bytes the operand occupies a) size of b) logical c) arithmetic d) relational 30. * represents ________- operator a) size of b) pointer c) comma d) none of the above 31. ?: represents ____ operator a) logical b) relational c) arithmetic d) conditional 32. Find the value of y =++m if m=5 a) 6 b)5 c)4 d)2 33. Find the value of y =m++ if m=5 a)6 b)5 c)4 d)2

34. An arithmetic expression without parentheses will be evaluated from_________ using the rules of precedence of operators a) left to right b) right to left c) high priority d) low priority 35. % c reads a _______ a) single character b) decimal integer c) floating value d) string 36. % d reads a _______ a) single character b) decimal integer c) floating value d) string 37. % s reads a _______ a) single character b) decimal integer c) floating value d) string 38. % f reads a _______ a) single character b) decimal integer c) floating value d) sting 39. % w specification denotes _______ a) single character b) decimal integer c) floating value d) width 40. The operator is true only when both the operands are true a) logical AND b) logical OR c) logical NOT d) relational operator 41. The switch expression must be an __________ type a)integral b) real c) decimal d) none of the above 42. Case labels must be _______ a) constants b) variables c) keywords d) none of the above 43. Case labels must end with _______ a) semicolon b) colon c) period d) comma 44. The ________ statement transfers the control out of the switch statement a) break b)if c) if else d)go to 45. The label in a go to statement must be followed by a ________ a) semicolon b) colon c) period d) comma 46. Multiway selection can be accomplished using an ______ statement a) switch b)if c) if else d)go to 47. The initialization in for loop is usually an ________ statement a) logical b) relational c) arithmetic d) assignment 48. The ________ statement is an entry controlled loop a) if b) while c) do while d) switch 49. The ________ statement is an exit controlled loop

a) if b) while c) do while d) switch 50. The ______ is optional in switch statement a) break b) default c) if d) if else 51. Which of the following are the keywords that used in switch statement? a) break b) default c) case d) all the above 52. The iterative statement in C include _______ a) while b) for c) do while d) all the above 53. The _______ statement is mandatory in switch a) break b) default c) case d) while 54. The control statement in C programming include _________ a) sequence b) selection c) iteration d) all the above 55. the conditional operator is a ________ operator a) primary b) secondary c) ternary d) none of the above 56. sentinal controlled loop is also known as _________ a) definite repetition b) indefinite repetition c) exit control d) none of the above 57. Counter controlled loop is also known as _________ a) definite repetition b) indefinite repetition c) exit control d) none of the above 58. \0 represents ________ a) null character b) single character c) string d) none of the above 59. The _________ function is used to determine the length of the string a) strlen b) strcpy c) strcat d) none of the above 60. The _________ function is used to copy the two strings a) strlen b) strcpy c) strcat d) none of the above 61. The array char name[9] can consist of a maximum of ______ characters a)9 b) 8 c)10 d)7 62. The array char name[9] can consist of a maximum of ______ characters a)9 b) 8 c)10 d)7 63. The array char name WELL DONE can consist of a maximum of ______ characters a) 9 b) 8 c)10 d)7 64. An array can be initialized either at compile time or at ______

a) run b) static c) both a and b d) global 65. ________ is the process of arranging elements according to their values a) searching b) sorting c) none of the above 66. Number of elements in two dimensional array is equal to ______ a) row*column b) row+column c) row column d) none of the above 67. A sorted list is called ________ list a) ordered b) sequential c) grouped d) ranged 68. The mechanism for packaging data of different types in C is called _______ a) arrays b)structures c) unions d) class 69. The mechanism for packaging data of same types in C is called _______ a) arrays b)structures c) unions d) class 70. ____ operator is used to access the structure elements a) dot b) semicolon c)comma d) colon 71. An array that uses more than two subscripts is referred to as __________ array a) one dimensional b) two dimensional c)three dimensional d) multi dimensional 72. Array belongs to ______ data type a) derived b) user defined c) fundamental d) none of the above 73. structure belongs to ______ data type a) derived b) user defined c) fundamental d) none of the above 74. The individual values of an array are called a) array size b) data structure c) elements d) pointers 75.

ANSWERS 1. b) Dennis Ritchie 2. b) AT&T Bell labs, USA 3. c) 1972 4. b) High level language 5. d) all the above 6. d) Both fractional and exponential forms 7. c) 254 characters 8. b) 32767 9. c) 8 characters 10. d) Both B & C above 11. c) 2 12. c) 1 13. b) semicolon 14. b) T_price 15.b) is used first 16. a)high level language program into object program 17.a) the source program to an object program 18. b) string constant 19. a)single character constant 20. a) semicolon 21. a) control 22. d) all the above 23. c) mixed mode arithmetic 24. a) logical AND 25. b) logical OR 26. c) logical NOT 27. a) 10 28. a) logical 29. a) size of 30. b) pointer 31. d) conditional 32. a) 6 33. b)5 34. a) left to right 35. a) single character 36. b) decimal integer 37. d) string 38. c) floating value 39. d) width

40. a) logical AND 41. a)integral 42. a) constants 43. a) semicolon 44. a) break 45. b) colon 46. a) switch 47. d) assignment 48. b) while 49. c) do while 50. b) default 51.d) all the above 52 d) all the above 53.a) break 54.d) all the above 55.c) ternary 56. b) indefinite repetition 57. a) definite repetition 58. a) null character 59. a) strlen 60.b) strcpy 61. b) 8 62. 63. c)10 64. a) run 65. b) sorting 66. a) row*column 67. a) ordered 68. b)structures 69. a) arrays 70. a) dot 71. d) multi dimensional 72. a) derived 73. b) user defined 74. c) elements