Fbise Notes-Computer | Conditional Control Structure | MCQs chapter no.4 class 10th


conditional control structure

Conditional Control Structure  CH# 04


Multiple Choice

Q. 1     Insert the correct option i.e. A/B/C/D in the empty box.

 i.      For which purpose if structure is used in programming?

    A.  Repetition                     B. Selection
                 C.   Sequence                        D. Input of data


ii.     Which statement is suitable to use in a situation where there are only two choices           based on a condition?

                  A.    if statement                       B.  if-else-if statement
                 C.   if-else statement                  D. switch statement



 iii.    Which statement can be used in place of switch statement?

                  A.    if statement                       B.  if-else statement
                 C.   if-else-if statement              D. conditional operator




 iv.    Which statement can be used in place of conditional operator?

                A.    if statement                          B.   if-else statement
                C.   else-if statement                  D. switch statement




  v.     Which statement is used to exit from the body of switch statement ?

                  A.    default                                B.  continue   
                 C.     exit                                      D.   break



 vi.      Which of the following is a multiple selection statement?
              
               A.    if statement                          B.  if-else statement
                 C.   if-else-if statement              D. none of these



 vii.    Which of the selection structures tests only for equality ?
              
             A.    if statement                           B.  if-else statement

                 C.  else-if statement                  D. switch statement



 viii.    What will be printed when the following code is executed ?

                x = 1;
                switch( x)
                {
                      case 1:
                      case 2:
                     case 3:
                                   printf( "\n x is a positive number");
                                   break;
                          default
                                     printf("\n value of x is 1");     }
                             

                    A.     value of x is 1                                 B.  x is a positive number
                   C.     Nothing will be printed                 D.  It will give error 







 ☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀☀

   


                                         
Fbise Notes-Computer | Conditional Control Structure | MCQs chapter no.4 class 10th Fbise Notes-Computer | Conditional Control Structure | MCQs chapter no.4 class 10th Reviewed by fbisenotes on August 22, 2019 Rating: 5

No comments:

Powered by Blogger.