Computer Concept & Programming In C - Unit III - 19



[I] Choose Correct Answers
1.  Which of the following is correct statement for checking a condition in if statement?
(a) if (a = b) (b) if (a, b) (c) if (a b) (d) if (a = = b)
(e) None of the above.                                          (AKTU. 2008-09)

2. At which stage ‘C’ preprocessor works?
(a) Before translation (b) Before execution
(c) Before linking (d) Before debugging
(e) None of the above.                                 (AKTU. 2008-09)

3. The value of an automatic variable that is declared but not initialized will be
(a) 0 (b) Unpredictable (c) - 1 (d) None of these.            (AKTU. 2009-10)

4. The following program fragment
for (i=3; i < 15; i=i + 3);
printf(“%d”, i);
results in
(a) A syntax error (b) An execution error
(c) Printing of 12 (d) Printin of 15.                       (AKTU. 2009-10)

5.  Which of the following doesn’t makes use of condition in its execution ?
(a) Loop (b) Case        (c) Function           (d) Decision.      (AKTU. 2010-11)

6. Which one of the following is a correct statement for checking a condition in IF THEN ELSE statement ?
(a) IF (A = B) (b) IF (A = B) (c) IF (A & B) (d) IF (A * B).             (AKTU. 2010-11)

7. In a C program, the statement for (i=0; i<5: i++) will iterate the loop:
(a) 4 Times (b) 5 Times (c) 6 Times (d) None of the above.       (AKTU. 2010-11)             
8. If k = 5 then the value of variable x after the execution of a C statement d x = k ++ will be
(a) 5 (b) 6 (c) randomly any one of the above
(d) value of x will not depend on k                               (AKTU. 2009-10)

9. For a C program code for (i = 0; i £ 10; i ++) {A}; A will run
(a) 10 times (b) 11 times (c) 12 times (d) None of the above.              (2009-10)
Q.10.  Which of the C construct is used to terminate a loop in the middle: (a) return statement (b) continue statement
(c) break statement (d) All of the above.                                    (AKTU. 2010-11)

Q.11. Minimum number of times a do while loop will execute:
(a) 2 times (b) 1 time (c) 0 time (d) None of the above.       (AKTU. 2010-11)                                   

[II] True / False Statements 
1. The do ...... while statement first executes the loop body and then evaluate the loop control expression.                                                                   (AKTU. 2008-09)

2.  C functions can return only one value under their function name.   (AKTU. 2008-09)

3.  Normal binary operators like + and - can be combined with assignment operator = to form new operators in C language.

4.   A compiler translates a High-level program into a machine understandable language.

5.   An algorithm might never terminate.

6.  In C language pointers can be used as a function argument.

7.  MS-WORD may be classified as an application software.              (AKTU. 2009-10)

[III] Fill in the Blanks

1. _________ is used to open a file.

2. _________ is used as a statement terminator in C.

3. The operator && in an example for ________ operator.

4. A function is called ________ when it calls itself.

5. An Editor can be classified as _________ software.                      (AKTU. 2009-10)



Choose Correct Answers
1. (d) 2. (c) 3. (b) 4. (d) 5. (c) 6. (a) 7. (b) 8. (a)
9. (b) 10. (c) 11. (b)

True / False Statements 
1. (T) 2. (T) 3. (T) 4. (T) 5. (F) 6. (T) 7. (T)

Fill in the Blanks
1. fopen ( ). 2. Semi-Colon (;)     3. Logical.    4. recursive.    5. system.