You are on page 1of 37

C-program

1.Reusability is not the feature of----------a. C++ b. java c. VB.net d. C Ans: d 2. A C Variable cannot start with a. A Number b. An Alphabet c. A special Symbol Option 1 AND Option 3 Ans:d d.

3.What are Character Constants? a. A character constant is a single character enclosed in single quotation marks. b. A character constant is a single character. c. A character constant is a character with numeric value. d. None of the above. Ans:a 4. i)strlen()used to Finds length of string ii)strlwr()used to Converts string to lowercase Find correct statement from above ? a.i b.ii c.i & ii d.none Ans:c 5.____ is a name given to memory location where we stores the constants a. Program b.Variable c.Function d. Loop Ans: b 6.i)If the CPU registers are not available,you can use static storage variables ii)C Accepts Two Diamentional Array Find correct statement from above ? a.i b.ii c.i & ii d.none Ans:b 7.______ is used to denote unsigned integer a. %d b. %f c. %u Ans:c 8.The operator / can be applied to a. integer values b. float values d. All of these Ans: d d. %c

c. double values

C-program
9.C can be on a.Ms-Dos b.Unix c.Linux of these Ans: d 10.This function accepts only String values. a.getchar b.getc c.gets d. scanf("%c",&a) Ans: c 11.This function prints only string values a.putchar b.putc c.printf Ans:d d.puts

d. All

12.What is the purpose of fgetc() function a. The fgetc() function gets a character from a stream b. The fgetc() function gets a number from a stream c. The fgetc() function gets a number and a character from a stream d. None of the above. Ans:c 13. if a=10 then,if(a%3) produce the value a.2 b.3 c.1 d.0 Ans: c 14. for(i=0;i<10;i) This loop stop after a.10 times b.9times c. Immediately d.never Ans: d 15.What is the extension of object code developed by the compiler? a. .cmp b. .object c. .obj d.none of the above Ans: c 16. Name the functions which are available in character I/O format a. getch(), getche(), getchar() b. getc(), clrscr() c. gets(), strcpy() d.none of the above Ans:a
2

C-program
17. What is the default way of passing the arguments in a function a.call by value b.call by reference c. Call by both value and reference d. Call by variable Ans:a

18.isupper() is used for a. Changing the character to uppercase is upper or not c. For both above Ans:b 19.What do header files consist of? a. Examples of functions. examples. c. Function declarations. definitions. Ans:d

b. Checking the case d. None of the

b. Prototype d. Function

20. i)We can create our own header file and put our own functions in it. ii)We can store 1000 values by using only one variable in c language Which answer is suitable for abow sentences ? a.i b.ii c. i & ii d.None Ans:c 21. Value in an Array can accessed using a.Value b.Address c.index d.None of the Left Ans:c 22.Which is not a valid version of C out of the following? a.ANSI b.Micro c.Unixc d.Turbo Ans:b 23. i)if(a=10)is Wrong? ii)Run time declaration is allowed in C Find correct statement from above ? a.i b.ii c. i & ii d.None Ans:a
3

C-program
24.What is the use of sprintf() a. Writes the ouput to string. array of characters c. Writes the output the file screen Ans:b

b. Writes the output to an d. Writes the output to

25.strcat function is used for a. To concatenate the strings c. To duplicate the string another Ans:a

b. To compare the string d. To copy one string to

26. Which of the following is not the type of operators? a. Sizeof Operators b. Cast Operators c. Ternary Operators d. Boolean Operators Ans:d 27. this function return single character from standard Inputdevice a.putchar b. getchar c. putc d. getc Ans:b 28. The type cast operator is a. (type) b. cast() Ans:a 29. What is C a. C is a programming language language c. C is a middle level language Ans:d 30. Full form of ANSI is a. American National Standard Institute Standard Infrastructure c. // d.

b. C is a English like d. All the above

b. All Nations
4

C-program
c. American National Standard Interface Institute Ans: a d. All Nations Social

31. To compile the file we have to use the short cut key as a. Alt+F9 b. Ctrl+F9 c. F5 d. F9 Ans:a 32. A character variable can at A time store a.1 character b.8 characters c. 254 characters d.None of the left Ans:a 33. This function return single character from input device a.putchar b.getchar c.putc d.getc Ans:d 34. Character constants should be enclosed between ____________ a. Single quotes b. Double quotes c. Both a and b d. None of these Ans:a 35. i)if Scanf("%c",a), the variable 'a ' accepts characters ii)char name='AJAY' Find correct statement from above ? a.i b.ii c. i & ii d.None Ans:d 36. ____ are used to stores the values a) Variable b) Function c) Arrays d) Loops a. i only b. i and iii c. i, ii and iii d. all of the above Ans:b 37. i)strcmp()used to cmpares two strings ii)strrev()used to reverse string Find correct statement from above ? a.i b.ii c. i & ii d.None Ans:c 38. If the size of the array is less than the number of
5

C-program
initializers then, a.Extra values are being ignored message c. Size of Array is increased when values are given Ans:b b. Generates an error d. Size is neglected

39. What output will the following statement gives Printf(The answer is=%d,a%b); Where a=25 and b=10 a.2.5 b.2 c.5 d.None of these Ans:c 40. Compliling Starts from a. main Function b. void function() d. getch(); Ans:a c. For loop

41. What will be the output of the expression 11 ^ 5? a.5 b.6 c.11 d.None of These Ans:d 42. ferror() reports any error that might have occurred during-------operation on file. a.read b.write c. read/write d. There is no such function Ans:d 43. if a=13.24 then,if(a%3) produce the value a.2 b.3 c.0 d.1 Ans:d 44. C is modified version of which languages a.C++ b.VC++ c. B and BPCL VC++ Ans:c d. C++ and

45. What will be the value of I in following statement? The statement is I=strcmp(Jerry,Jerry); a. Strings are equal b.1 c.TRUE d.0 Ans:d
6

C-program
46. This keyword allows us jump statements outside the loop a.break b.exit c. continue d.None of the above Ans:a 47. Which operator is used with goto statement a. : b. ; c. ! d. & Ans:a 48.This keyword allows us passing statements inside the loop a.break b.exit c. continue d.None of the above Ans:c 49. On some occasions it may be desirable to cause a defined name to become undefined. This can be accomplished by means of -------------directive. a. #undefine b. #undef c. #undefined d. #undefin Ans:b 50. Which of the following is not the type of instruction? a. Arithmetic instruction b. Type declaration instruction c. Control Instruction d. Input Instruction Ans:d 51. In Pointer,'&' is represent a. Address Operator c. Address of Address Ans:a b. value of address d. None of The Left

52. Maximum number of elements in the array declaration int a[5][8] is a.28 b.32 c.35 d.40 Ans:d 53. Which of the following is the boolean operator for logical-and? a. & b. && c. | d. |& Ans:b
7

C-program
54. i)Language is case sensitive ii)Write C algorithm we have to write C code in that algorithm Find correct statement from above ? a.i b.ii c. i & ii d.None Ans:a 55. Which of the following is not the processor? a. Debugger b. Editor c. Preprocessor Compiler Ans:a 56. It is a Prechecking loop a. for loop b. while loop d. None of The Above Ans:b c. do-while loop d.

57. The exit statement is used to exit from a. if statement b. for loop c. a program function Ans:c

d.

58. i)The Register storage class variables cannot hold float value ii)Most of the times we need to use atomatic storage class variables Find correct statement from above ? a.i b.ii c. i & ii d.None Ans:d 59. i)strdup()used to duplicates a string ii)strupr()used to converts a string to uppercase Find correct statement from above ? a.i b.ii c. i & ii d.None Ans:c 60. Which of the statement is true i) Program requires at least one main function ii) Program does not requires any main function iii) Program requires more than one main function iv) Program requires one & only main function
8

C-program
a. All statements d. iv is true Ans:d b. i is true c. i and iii are true

61. After Compiling the C Source File TC creates a new file as a. .exe b. .bak c. .obj d. .c Ans:c 62. Compliling Starts from a. Main Function b. #include Getch(); Ans:a c. For loop d.

63. C is developed in the year of a.1970 b.1972 c.1989 Ans.b 64. Full form of ANSI is a. American National Standard Institute Standard Infrastructure c. American National Standard Interface Social Institute Ans:a

d.1976

b. All Nations d. All Nations

65. i)if(a=10)is Wrong? ii)Run time declaration is allowed in C Find correct statement from above ? a.i b.ii c. i & ii d.None Ans:a 66. This is not valid increment statement a. a++; b. ++a; c. a+=2; d.none Ans: d 67. for(i=0;i<10;i) This loop stop after a.10times b.9times c. Immediately Ans:d d.Never

68. ____ is a name given to memory location where we stores the constants a.Program b.Variable c.Function d.Loop Ans:b
9

C-program
69. i)if(a==10) is Wrong? ii)In while loop,while(count<=3); { } is correct? Find correct statement from above ? a.i b.ii c. i & ii d.None Ans:d 70. Which of the statement is true i) Program requires at least one main function ii) Program does not requires any main function iii) Program requires more than one main function iv) Program requires one & only main function a. All statements b. i is true c. i and iii are true d. iv is true Ans:d 71. int a[5]; will stores a. May contain Five integers c. Four Integers Ans:d b. Six Integers d. Exactly Five Integers

72. char a[15]=Welcome here; then a[7] will stores a. e b. h c.H d. None of the above Ans:d 73. Find out wrong statements i) if(a=0) ii) For (;i<10;) iii) for(a[i]=0;a[i]!=/0;i++) iv) while(a++) a. all of the above b. none of the above c. i only d. i and iv Ans:d 74. int a=125621; This is statement will print a.125621 b. a c. int d. None of the above Ans:d 75. Which of the following statement is correct a) FILE *fptr b) File *fptr; c) file *fptr; d) FILE *fptr; a.None of the above b. All of the above c. iv only d. i and iv Ans:c 76. i=0; printf(%d,i++); This will print i as
10

C-program
a. 0 above Ans: a b. 1 c. -1 d. None of the

77. ____ are used to stores the values a) Variable b) Function c) Arrays d) Loops a. i only b. i and iii c. i, ii and iii d. all of the above Ans:b 78. The Range of char data type is ______ to ______. a. -128 to 127 b. -32768 to 32767 c. 0 to 256 d. -255 to 256 Ans:a 79. C is used for a. System programming c. For database storage Ans:a b. Object Oriented programming d. For Only seeing output

80. what output will the following statement gives printf(The answer is:-%f, (float)a/b); Where a= 10 and b=4 a. There is no such C statement b. 2.5 c. 2 d. It will give error as cant convert from int to float Ans:b 81. following of which is called as preprocessors in C a. #define b. #preprocessor c. #stdio.h d. None of above Ans: a 82. i)Language is case sensitive ii)Write C algorithm we have to write C code in that algorithm Find correct statement from above ? a. i b. ii c. i & ii d. None Ans: a 83. Which of the following is not the type of operators? a. Sizeof Operators b. Cast Operators c. Ternary Operators d. Boolean Operators Ans:d
11

C-program
84. What will be the value of I in following statement? The statement is I=strcmp(Jerry,Jerry); a. Strings are equal b. 1 c. TRUE d. 0 Ans:d 85. Reusability is not the feature of----------a. C++ b. Java c. VB.Net Ans:d d.c

86. Which of the following is console Input/Output function? a. open() b. fclose() c. getche() d. write() Ans: c 87.There are three main areas where text and binary mode files are different? a. Handling of newlines b. Representation of end of file c. Storage of numbers. d. All the above Ans: d 88. Which of the following is not the standard file pointer a. stderr b. stdopen c. stdaux d. stdprn Ans: b 89. What is the use of fflush a. It is used to flushout the buffer. contents of file c. It is used to flushout the program contants of program Ans:a b. It is used to flushout the d. It is used to flushout the

90. _____ is array of pointers to strings a.argc b.args c.argp Ans:d

d.argv

91. feof() is a macro which returns a-------if end of file is not reached a.0 b.1 c.-1 d.none of the above Ans:d 92. exit() function comes under which header file?
12

C-program
a.conio.h Ans:d b.manip.h c.stdio.h d. process.h

93. What is the use of sprintf() a. Writes the ouput to string. an array of characters c. Writes the output the file screen Ans:b

b. Writes the output to d. Writes the output to

94. i)if for(int i=0;i<10;i++); is correct? ii)There is no difference between declaration and definition of structure Find correct statement from above ? a.i b.ii c. i & ii d.None Ans:d 95. Which of the following is the application of structure? a. Changing the size of cursor b. Sending the output to printer c. Checking the memory size of the computer d. All the above Ans:d 96. If we construct an ------------------- it would contain a number of addresses. a.Array b. Array of addresses c. Array of pointers to variables d. Array of pointers Ans:d 97. what is the use of strcmpi? a. Compares two strings with regard to case. b. Compares first i characters of string. c. Compares two strings d. Compares two strings without regard to case Ans:d 98. i)<conio.h>stands for console input-out headerfile ii)If int square(),it is a Standard Library function? Find correct statement from above ? a.i b.ii c.i & ii d.None Ans.a
13

C-program
99. Which of the following operation on pointers will work out? a. Addition of two pointers b. Multiplication of a pointer with a constant c. Division of a pointer with a constant d. none of the above Ans:d 100. On some occasions it may be desirable to cause a defined name to become undefined. This can be accomplished by means of -------------directive. a.#undefine b. #undef c. #undefined d. #undefin Ans:b 101. Macros can have------------a. arguments b. variables c. parameters constants Ans:a 102. Which of the following is not the processor? a. Debugger b. Editor c. Preprocessor Compiler Ans:a d.

d.

103. Which of the following variable type have the default initial value of zero? a. Static & External b. External & Automatic c. Automatic & Register d. Register & Static Ans:a 104. Give the range of long unsigned int a.0 to 42949 b.0 to 65535 c.0 to 32768 d.None of the above Ans:a 105. Which operator is used with goto statement a. : b. ; c. ! d. & Ans: a 106. Break actually associated with------------14

C-program
a.while Ans:c b.if c.switch d.do-while

107. Which of the following is not the type of logical operators a. & and | b. && c. || d. ! Ans:a 108. i)The Register storage class variables cannot hold float value ii)Most of the times we need to use atomatic storage class variables Find correct statement from above ? a. i b. ii c. i & ii d. none Ans:d 109. Library functions are classified into--------------------a. Console I/O functions b. Disk I/O functions c. Port I/O functions d. All the above Ans:d 110. Which the conversion character for unsigned hexadecimal? a. %uh b. %ux c. %uf d. %x Ans:d 111. Which of the following are main types of Disk I/O functions? a. Text and Binary b. Formatted and Unformatted c. Input and Output d. High level and Low level Ans:d 112. What is the use of w+ file opening mode? a. Serches file. If the file exist, loads it into memory and sets up a pointer which points to the first character in it. b. Serches file. If the file exists, its contents are overwritten. c. Searches file. If the file exists, its contents are destroyed. If the file doest exist a new file is created.Returns Null, if d. None of the above Ans:c 113. Which of the following is not the type of instruction?
15

C-program
a. Arithmetic instruction c. Control Instruction Ans:d b. Type declaration instruction d. Input Instruction

114. What is the rule for constructing real constants a. A real constant must have at least one digit. b. It must have a decimal point c. Default sign is positive d.All the Above Ans:d 115. Language falling in the category of C is--------------a. C++ b. Java c. Vb.net d.Pascal Ans:d 116. What is C a. C is a programming language language c. C is a middle level language Ans:d b. C is a English like d. All the above

117. i)If the CPU registers are not available,you can use static storage variables ii)C Accepts Two Diamentional Array Find correct statement from above ? a. i b. ii c. i & ii d.None Ans:b 118. ferror() reports any error that might have occurred during-------operation on file. a.read b.write c. read/write d. There is no such function Ans:d 119. What is the use of gotoxy() function in C? a. There is no such function in C b. There is no such function in C c. It places the cursor at the top of the screen d. It places the cursor at appropriate position on the screen. Ans:d 120. fputs()us used to a. Write the character b. Write the numbers
16

C-program
c. Write the string array to the disk Ans:d d. write the contents of the

121. What will be the output of following program #define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); } a.23 b.45 c.60 d.None Ans:d

122. What will be the output of following program main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p+ +; printf("%s %s",p,p1); } a. ibj!gs jfoet b. hai friend c. jidkf. Kdjf d. jilkjssl;m Ans:a 123. What will be the output of following program? #include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); } a.23 b.50 c.64 d.87 Ans:b 124. What will be the output of following program? #define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); } a.23 b.45 c.100 d.87 Ans:c 125. What will be the output of following program main() { 100; printf("%d\n",100); } a.23 b.45 c.100 d.64 Ans:c 126. What will be the output of following program main() { clrscr(); } clrscr(); a. No output/error b. main( ) c.100 d.64 Ans:a
17

C-program
127. What will be the output of following program? enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d.. %d",BLACK,BLUE,GREEN); return(1); } a. 0..1..2 b. 2..1..0 c. 1..2..0 d.100 Ans:a 128. i)C Accepts Multidiamentional Array ii)C Accepts Pointer with Array Find correct statement from above ? a. i b. ii c. i & ii d.None Ans:c 129. What will be the output of following program? void main() { char far *farther,*farthest; printf("%d.. %d",sizeof(farther),sizeof(farthest)); } a. 0..1..2 b. 4..2 c. 1..2..0 d.100 Ans:b 130. What will be the output of following program? main() { char *p; p="Hello"; printf("%c\n",*&*p); } a. H b. l c. o d. l Ans:a 131. C Language has beenDevelped by a. Ken Thompson b. Dennis Ritchie d. Martin Richards Ans:b c. Peter Norton

132. C Language has beenDevelped at a. Micorosoft b. IBM c. AT & T Bell Labs d. Borland Ans: c 133. C can be on a. Ms-Dos b. Unix Above Ans:d c. Linux d.All the

134. i)Datatypes float and double are same ii)Printf() used to print on the Screen Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:b
18

C-program
135. C programs are converted into machine Language with help of a. An Interpreter b. A Compiler c. An Operating System d.none of the left Ans:b 136. A character variable can at A time store a.1 character b.8 characters c.254 characters d.None of the left Ans;a 137. The Maximum value that an integer constant can have is a. -32767 b.1.70E+38 c. 32767 d. -1.70E+38 Ans:c

138. A C Variable cannot start with a.A Number b. An Alphabet c. A Special Symbol Option 1 AND Option 3 Ans:d 139. If a is an integer variable,a=5/2;will return value a. 2 b.2.5 c.3 d.0 Ans;a

d.

140. The expression,A=7/22*(3.14+2)*3/5;evaluates to a.8.28 b.6.28 c.3.14 d.0 Ans:d 141. C is a Very Popular Language why? a. Platform Independent b. Object Oriented c. Easy to Use and Simple d. All The Left Ans:c 142. i)Scanf("%s",a)is wrong? ii)i++ and ++i are same Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:d
19

C-program
143. if a=10 then,if(a%3) produce the value a.2 b.3 c.1 d.0 Ans:c 144. if a=13.24 then,if(a%3) produce the value a.2 b.3 c.0 d.1 Ans:d 145. It is a Prechechecking loop a. for loop b. while loop d. None of The Left Ans:b 146. It is a Postchechecking loop a. for loop b. while loop d. None of The Left Ans:c c. do-while loop

c. do-while loop

147. This keyword allows us passing statements inside the loop a. break b. exit c. continue d. None of the Above Ans:c 148. This keyword allows us jump statements outside the loop a. break b. exit c. continue d. None of the Above Ans:a 149. do-while loop useful when we want loopmust be executed a. Only Once b. Morethan once c. Atleast Once d. None of The Left Ans:c 150. i)if Scanf("%c",a), the variable 'a ' accepts characters ii)char name='AJAY' Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:d
20

C-program
151. How many parts in For Loop? a. 1 b. 2 c. 0 Ans:d d.3

152. The break statement is used to exit from a. if statement b. for loop c. a program main function Ans:c

d.

153. This function return single character from input device a. putchar b. getchar c. putc d. getc Ans:d 154. This function return single character to output device a. putchar b. getchar c. putc d. getc Ans:c 155. this function return single character from standard Inputdevice a. putchar b. getchar c. putc d. getc Ans:b

156. his function return single character to standard outputdevice a. putchar b. getchar c. putc d. getc Ans:a 157. This function accepts only String values. a. getchar b.getc c.gets scanf("%c",&a) Ans:c 158. This function prints only string values a. putchar b. putc c. printf Ans:d d.

d.puts

159. i)if (a==10); is Wrong? ii)int Datatype accepts decimals Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:d
21

C-program
160. It is a standard Library function a. exit() b. get() c. display() The Left Ans:a 161. void means a. function b. produce return value d. None of The Left Ans;c 162. In Pointer,'*' is represent a. Address Operator c. Address of Address Ans:b 163. In Pointer,'&' is represnet a. Address Operator c. Address of Address Ans:a 164. An Array means a. set of values b. set of address None of The above Ans:a 165. An Array starts from a. value b. address Left Ans:c

d. None of

c. no Return value

b. value of address d. None of The Left

b. value of address d. None of The Left

c. set of datatypes

d.

c. index

d. None of The

166. How Many Types of Sorting is available? a. 1 b. 2 c. 3 d. 0 Ans:c 167. int num[5],here Maximum how many values store? a. 5 b. 1 c.6 d.0 Ans:a 168. i)break and continue keyword only used the loop only ii)No commasor or blanks are allowed within a variablename Find correct statement from above ?
22

C-program
a. i Ans:b 169. FILE IS A a. Keyword of The Left Ans:c b.ii c. i & ii d.None

b. commands

c. structure

d. None

170. fopen() is used to a. close the file b. exit from the file d. Open a File Ans:d 171. fclose() is used to a. close a file b. exit from the file d. Open a File Ans:a 172. fgetc() used to a. read the numbers c. write the characters Ans:b 173. fputc()used to a. read the character c. read the numbers Ans:d

c. print on the file

c. print on the file

b. read the characters d. None of The Left

b. write the numbers d. write the characters

174. if fopen("js.c","r"),here "r" means? a. random only b. read only c. resize only The Left Ans:b 175. if fopen("js.c","w"),here "w" means? a. With Open b. OverWrite c. wrire only of The Left Ans:c 176. fgets()is used to a. read the character c. read the numbers array from the disk

d. None of

d. None

b. read the characters d. read contents of the


23

C-program
Ans:d 177. i)Is this array correct int num(10)? ii)char name[3]={"ABC","BCA","CBA","CAB"}; is correct? Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:d 178. i)strlen()used to Finds length of string ii)strlwr()used to Converts string to lowercase Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:c 179. i)strcat()used to appends one string at the end of another ii)strcpy()used to copies a string to another Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:c 180. i)strcmp()used to cmpares two strings ii)strrev()used to reverse string Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:c 181. i)strdup()used to duplicates a string ii)strupr()used to converts a string to uppercase Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:c 182. i)strncpy()used to copies one string to another ii)strchr()used to finds a string Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:d 183. i)structures is a set of datatypes ii)Nested Structure is one structure with another structure Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:c
24

C-program
184. i)Structures accepts arrays ii)structures accepts Pointers Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:c 185. i)structures accpets string functions ii)structure is a datatype of c Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:c 186. i)structures'S important feature is database management ii)structures accepts pointer and array in same programe Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:c 187.i)structures accepts all datatypes ii)structures is a one of the Main feature of C Language Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:c 188. Which of the following is console Input/Output fuction? a. open() b. fclose() c. getche() d. write() Ans:c 189. i)In do-while loop, do{while(i<count)}is correct? ii)10. if for(int i=0;i<10;i++); is correct? Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:d 190. i)There is no difference between declaration and definition of structure ii)<conio.h>stands for console input-out headerfile Find correct statement from above ? a. i b.ii c. i & ii d.None Ans:b 191. i)printf and scanf functions are built in functions in C ii)There is no difference between constants and variables Which answer is suitable for abow sentences ?
25

C-program
a. i Ans:a b.ii c. i & ii d.None

192. len(s) function comes under which header file? a. Stringio.h b. String.h c. Stringinput.h Stringoutput.h Ans:b

d.

193. To compile the file we have to use the short cut key as a. Alt+F9 b. Ctrl+F9 c. F5 d.F9 Ans:a 194. To execute the file we have to use the short cut key as a. Alt+F9 b. Ctrl+F9 c. Ctrl+F7 d. Alt+F8 Ans:b 195. What output will the following statement gives Sizeof(int) a.2 b.4 c.1 d.256 Ans:a 196. What output will the following statement gives Printf(The answer is=%d,a%b); Where a=25 and b=10 a.2.5 b.2 c.5 d. None of these Ans:c 197. i)There is no difference between while and do-while ii)C Language is case sensitive Which answer is suitable for abow sentences ? a. i b.ii c. i & ii d.None Ans:b 198. i)We can give keyword names to variables ii)A semicolon must follow the closing brace in the structure type declaration. Which answer is suitable for abow sentences ? a. i b.ii c. i & ii d.None Ans:b 199. The range of float is. a. -128 to 127 b.-32768 to 32768
26

C-program
c. 3.4e-38 to 3.4e+38 Ans:c d. 1.7e38 to 1.7e+38

200. i)We can create our own header file and put our own functions in it. ii)We can store 1000 values by using only one variable in c language Which answer is suitable for abow sentences ? a. i b.ii c. i & ii d.None Ans:c 201. Strcat function is used for a. To concatenate the strings c. To duplicate the string another Ans:a b. To compare the string d. To copy one string to

202. i)We have to give semicolon after for statement ii)Array comes under secondary constants Which answer is suitable for abow sentences ? a. i b.ii c. i & ii d.None Ans:b 203. The scope of global variable is a. Only in one function b. May used outside the function c. There is no such variable in C d. We can use variable to store values only Ans:b 204. After Compiling the C Source File TC creates a new file as a. .exe b. .bak c. .obj d. .c
Ans:c

205. _____ returns nothing a. int b.Float Ans:d

c. Char

d. void

206. Which of the loop will execute at least one time a. For b. While c. DoWhile d. None of the above Ans:c
27

C-program
207. a=K; printf(%d,a); This will print a. K b. K c. ASCII value of K None of these Ans:c 208.______ is used to denote unsigned integer a. %d b. %f c. %u Ans:c 209. int a[5]; will stores a. Five characters b. Four characters d. Five Integers Ans:d 210. _____ refers to memory address a. & b. * c. = Ans:a

d.

d. %c

c. Four Integers

d. ++

211. Find out wrong statements i.if(a=0) ii.For (;i<10;) iii.for(a[i]=0;a[i]!=/0;i++) iv.while(a++) a. all of the above b. none of the above c. i only i and iv Ans: d

d.

212. int a=125621; This is statement will print a. 125621 b. a c. int d. none of the above Ans: d 213. isupper() is used for a. Changing the character to uppercase upper or not-Ans c. For both above Ans:b b. Checking the case is d. None of the

214. The Range of char data type is ______ to ______. a. -128 to 127 b. -32768 to 32767 c. 0 to 256 -255 to 256 Ans:a

d.

28

C-program
215. The Conversion character used for single data item is. a. %s b. %c c. %d d. %f Ans:b 216. Escape sequence used for new line is. a. \n b. \t c.\a Ans:a d. \nl

217. i)Run time declaration is allowed in C ii)We cant give variable name bigger than 8 characters Which answer is suitable for abow sentences ? a. i b.ii c. i & ii d.None Ans:d 218. Which of the following symbol is used to denote a preprocessor statement? a. ! b. # c. ~ d. ; Ans:b 219. Character constants should be enclosed between ____________ a. Single quotes b. Double quotes c. Both a and b d. None of these Ans:a 220. Which of the following is invalid? a. b. c. a d. abc Ans:d 221. The maximum length of a variable in C is ___ a. 8 b. 16 c. 32 d. 64 Ans:d 222. The operator && is an example for ___ operator. a. Assignment b. Increment c. Logical d. Rational Ans:c 223. The operator / can be applied to a.integer values b. float values c. double values d. All
29

C-program
of these Ans:d

224. The equality operator is represented by a. := b. .EQ. c. = Ans:d

d. ==

225. What will be the output of the expression 11 ^ 5? a. 5 b. 6 c. 11 d. None of these Ans:d 226. In the C language 'a represents a. a digit b. an integer c. a character a word Ans:c 227. The number of the relational operators in the C language is a. Four b. Six c. Three One Ans:b 228. The continue command cannot be used with a. for b. switch c. do while Ans:b d.

d.

d.

229. Maximum number of elements in the array declaration int a[5][8] is a. 28 b. 32 c. 35 d. 40 Ans:d 230.If the size of the array is less than the number of initializers then, a. Extra values are being ignored b. Generates an error message c. Size of Array is increased d. Size is neglected when values are given Ans:b
30

C-program
231. Array subscripts in C always start at a. -1 b. 1 c. 0 provided by user Ans:c 232. Z= (10<20)? 500:1000 then Z=? a. 10 b. 20 c. 500 Ans:c

d. Value

d.1000

233. Integer Division results in a. Rounding the fractional part part c. Floating value Ans:b 234. The type cast operator is a. (type) b. cast() Ans:a

b. truncating the fractional d. An Error is generated

c. //

d.

235. What punctuation ends most lines of C code? a. . . b. ; c. : d. ' Ans:b 236. What punctuation is used to signal the beginning and end of code blocks? a. { } b. -> and <c. BEGIN and END d. (and) Ans:a 237. Which of the following comes under numerical value? a. 1 b. 66 c. 0.1 d. All of the above Ans:d 238. Which of the following is the boolean operator for logical-and? a. & b. && c. | d. |& Ans:b
31

C-program
239. Which of the following shows the correct syntax for an if statement? a. if expression b. if{ expression c. if( expression) d. expression if Ans:c 240. When does the code block following while(x<100) execute? a. When x is less than one hundred b. When x is greater than one hundred c. When x is equal to one hundred d. While it wishes Ans:a 241. Which is not a loop structure? a. For b. Do while Repeat Until Ans:d c. While d.

242. Which is not a valid version of C out of the following? a. ANSI b. Micro c. UnixC d. Turbo Ans:b 243. C is modified version of which languages a. C++ b. VC++ c. 0 B and BPCL and VC++ Ans:c 244. Is C a case sensitive language? a. TRUE b. FALSE c. Partially True None of the above Ans:a d. C++

d.

245. What is linker? a. Linker is a program which links the standard library files to the object code generated by the compiler to build an b. Linker is a module which links one file to another. c. Linker links an object code to a source code. d. None of the above. Ans:a
32

C-program
246. What do header files consist of? a. Examples of functions. b. Prototype examples. c. Function prototypes. d. Programs. Ans:d 247. What is the extension of header files? a. .h b. .hdr c. .hr Ans:a 248. What is the extension of C source files? a. .cpp b. .c c. .csource Ans:b d. .he

d.src

249. What is the extension of object code developed by the compiler? a. .cmp b. .object c. .obj d. none of the above Ans:c

250. What is the extension of executable code? a. .obj b. .exe c. .c of the above Ans:b 251. What is the extension of library files? a. .lbr b. .lib c. .lnk of the above Ans:b 252. Is it possible to have nested comments? a. Sometimes b. Yes c. Many times Ans:d

d. none

d. none

d. No

253. Which function is considered as the entry point of the program? a. void main() b. main() c. main d. void main Ans:b 254. What are constants? a. Constants are those variables which do not change their
33

C-program
value throughout the program. b. Constants are those values which do not change their value throughout the program. c. Constants are those values which do not change their value for a long time. d. None of the above. Ans:a 255. C Language came into existence in the year a. 1972 b. 1957 c. 1983 Ans:a d. 1971

256. This statement can cause program control to endup almost antwherein the program. a. continue b. goto c.break d. exit Ans:b

257. What is a pointer a. A pointer is a memory variable which stores the memory address of another variable b. A pointer is a variable which points to another variable c. A pointer is an extraordinary variable. d. None of the above. Ans:a 258. What do you mean by recursion a. Recursion is a method in which a function calls another function b. Recursion is the method by which a function calls itself c. Recursion is a method of circular reference d. Recursion is a way of calling a function Ans:b 259. What is the default way of passing the arguments in a function a. Call by value b. Call by
34

C-program
reference c. Call by both value and reference Ans:a d. Call by variable

260. What are functions a. Function in C is a set of blocks b. Function in C is usually defined as a named block of statements which performs a specified task or subtask. c. Function in C is a named set of modules d. Function in C is a named set of statements Ans:b 261. What is the purpose of fgetc() function a. The fgetc() function gets a character from a stream b. The fgetc() function gets a number from a stream c. The fgetc() function gets a number and a character from a stream d. None of the above. Ans:c

262. The getche() function a. Does not echo the input value on the screen b. Is a display function. c. Is not a valid function of C. d. Echoes the input value on the screen. Ans:d 263. What are arrays a. An array is a linear and homogenous data structure b. An array is a non-linear and homogenous data structure c. An array is a group of elements. d. None of the above. Ans:a 264. What is getch() function a. This function works like wait or pause b. This function reads a single character from a std input such as a keyboard but it does not display or echo the character c. This function accepts a character with the CR (carriage
35

C-program
return). d. This function accepts a string. Ans:b 265. Name the functions which are available in character I/O format a. getch(), getche(), getchar() b. getc(), clrscr() c. gets(), strcpy() d. None of the above Ans:a 266. Is there any String datatype in C a. Yes Strings, not String. c. No. The keyword is Str, not String. Ans:d b. No. The keyword is d. No

267. What are escape sequences a. These are the special characters which are enclosed with backslash b. These are the special characters which start with frontslash c. These are the special characters which start with backslash d. None of the above. Ans:a

268. What are Character Constants? a. A character constant is a single character enclosed in single quotation marks. b. A character constant is a single character. c. A character constant is a character with numeric value. d. None of the above. Ans:a 269. What are Floating Point Constants? a. A floating point constant is a decimal number. b. A floating point constant is a base 10 number that contains either a decimal point or an expression. c. A floating point constant is a special number. d. None of the above.
36

C-program
Ans:b

37

You might also like