Fundamentals of



Download 9.46 Mb.
Page56/57
Date09.01.2017
Size9.46 Mb.
#8172
1   ...   49   50   51   52   53   54   55   56   57

1. The keyword void in function declaration indicates

A. The function will return \int\type of value

B. The function will return a default value

C. A function not returning any value

D. The function will return \void\type of value

2. The format specification is used to write a long integer variable.

A. %d


B. %dd

C. %ld

D. %if

3. Constants in C refer to

A. A fixed value that do not change during the execution of the program.

B. A fixed value that can change during execution of the program

C. A fixed value that can change after compilation of the program

D. A fixed value that can change after linking the program

4. Which of the following function is used to send the output to the console?

A. Scanf B. Getch C. Printf D. Clrscr



5. =n „C‟ a semicolon is used A. To terminate a statement B. To break a loop

C. To give a comment

D. None

A.

1

B.

2

C.

3




6. If a=3, b=0 and c=4, what is the value of the expression a && b || c

D. 4


7. The logical OR operator is denoted by a symbol in C program


8.
9.
10.
11.
12.
13.


14.
15.


16.

A. && B. || C. |



D. &

Which one of the following is a logical operator?

A. =

B. &&

C. <> D. +



Two – way selection is implemented using the statement.

A. If-else

B. for

C. switch

D. Nested if else

switch‟ statement is used to make a decision



A. To switch the processor to execute some other program

B. Between two alternatives

C. Amongst many alternaives

D. None of these

The format specification is used to read or to write a Short integer variable.

A. %c

B. %d C. %hd D. %f



break’ statement is used

A. To terminate a loop and execute the next statement

B. To skip a loop and terminate the program

C. To continue a loop and execute next statement

D. Execute a next statement

Which of the following statements determines if the contents of string1 are same as string2?

(Where string1 and string2 are well formed string.)

A. if ( string1 == string2)

B. if (string1, string2)

C. if (strcmp (string1,string2) ==0)

D. if (strcmp (string1, string2) <0)

The binary expressions are formed by an Combination.

A. Operand-operator-operand

B. Operator-operand

C. Operator-operand-operator

D. Operand-operator

The ‘sizeof’ operator tells us the size of a type or a primary expression in terms of number of

.

A. Bytes

B. Bits

C. Nibbles

D. Words

Which one of the following is an Arithmetic operator?

A. *

B. ||


C. &


D. None above

17. The loop condition is tested at the of the do while’ contruct

A. Start

B. End

C. Middle

D. Start & End


18.
19.
20.

variables are named area of that is used to hold data



a.Memory location(s)

b.Row and column number on a monitor

c. Row and column number on a printer

d.None of the above

In do-while loop, loop condition is checked at the _.

A. Beginning of loop

B. End of loop

C. End of program

D. Start of program

Which of the following control structures are used in the iteration logic-




A. B. C.

D.

21.



if then if else

do while repeat Until

do & while

do while if else

goto statement is used to –





22.
23.

A. Pass the control anywhere in the program.

B. Execute a statement for multiple statements.

C. Execute a single statement from set of multiple statements.

D. All of above

Switch statement allows us to

A. Make a decision from the number of choices.

B. Execute a statement at least ones before checking a condition

C. Execute a statement for multiple times

D. None of the above

In case statement (case we can give




A.

B. C.


D.


Download 9.46 Mb.

Share with your friends:
1   ...   49   50   51   52   53   54   55   56   57




The database is protected by copyright ©ininet.org 2024
send message

    Main page