Home / C Programming / Control Instructions :: General Questions

C Programming :: Control Instructions

  1. How many times "FresherGATE" is get printed?

    #include
     int main()
     {     
         int x;  
         for(x=-1; x10; x++)   
         {        
            if(x 5)                      
               continue;     
            else        
                break;         
            printf("FresherGATE");  
        } 
        return 0;
     } 
    

  2. A.

    Infinite times

    B.

    11 times

    C.

    0 times

    D.

    10 times


  3. How many times the while loop will get executed if a short int is 2 byte wide?

     #include
     int main() 
     {    
         int j=1;  
         while(j 255)     
         {        
           printf("%c %d\n", j, j);         
           j++;   
         }  
         return 0; 
    }   
    

  4. A.

    Infinite times

    B.

    255 times

    C.

    256 times

    D.

    254 times


  5. Which of the following is not logical operator?

  6. A.
    &
    B.
    &&
    C.
    ||
    D.
    !

  7. In mathematics and computer programming, which is the correct order of mathematical operators ?

  8. A.
    Addition, Subtraction, Multiplication, Division
    B.
    Division, Multiplication, Addition, Subtraction
    C.
    Multiplication, Addition, Division, Subtraction
    D.
    Addition, Division, Modulus, Subtraction

  9. Which of the following cannot be checked in a switch-case statement?

  10. A.
    Character
    B.
    Integer
    C.
    Float
    D.
    enum