New ! Computer Applications MCQ Practise Tests



Looping Structure 1 Mark Book Back Question Paper With Answer Key

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Applications

Time : 00:15:00 Hrs
Total Marks : 10

    Multiple Choice Question

    10 x 1 = 10
  1. Loops that iterate for fixed number of times is called

    (a)

    Unbounded loops

    (b)

    Bounded loops

    (c)

    While loops

    (d)

    For loops

  2. Which loop evaluates condition expression as Boolean, if it is true, it executes statements and when it is false it will terminate?

    (a)

    For loop

    (b)

    For each loop

    (c)

    While loop

    (d)

    All of them

  3. What will be displayed in a browser when the following PHP code is executed:
    < ?php
    for (\($\)counter = 20; \($\)counter < 10;
    \($\)counter++){
    echo “Welcome to Tamilnadu “;
    }
    echo “Counter is: $counter”;
    ? >

    (a)

    Welcome to Tamilnadu

    (b)

    Counter is: 20

    (c)

    Welcome to Tamilnadu Counter is: 22

    (d)

    Welcome to Tamilnadu Welcome to Tamilnadu Counter is: 22

  4. What will be displayed in a browser when the following PHP code is executed :
    < ?php
    for (\($\)counter = 10; \($\)counter < 10;
    \($\)counter = \($\)counter + 5){
    echo “Hello”;
    }
    ? >

    (a)

    Hello Hello Hello Hello Hello

    (b)

    Hello Hello Hello

    (c)

    Hello

    (d)

    None of the above

  5. PHP supports which types of looping techniques;

    (a)

    for loop

    (b)

    while loop

    (c)

    foreach loop

    (d)

    all the above

  6. Consider the following code
    < ? php
    \($\)count=12;
    do{
    printf(“%d squared=%d
    ",
    \($\)count, pow(\($\)count,2));
    } while(\\($\)count<4);
    ? >
    What will be the output of the code

    (a)

    12 squared 141

    (b)

    12 squared=141

    (c)

    “12 squared=141”

    (d)

    Execution error

  7. What will be the output of the following PHP code ?
    < ?php
    for (\($\)x = 1; \($\)x < 10;++\($\)x)
    {
    print “*\t”;
    }
    ? >

    (a)

    **********

    (b)

    *********

    (c)

    ***********

    (d)

    Infinite loop

  8. What will be the output of the following PHP code ?
    < ?php
    for (\($\)x = -1; \($\)x < 10;--\($\)x)
    {
    print \($\)x;
    }
    ? >

    (a)

    123456713910412

    (b)

    123456713910

    (c)

    1234567139104

    (d)

    Infinite loop

  9. The loop exclusively used for arrays is ____________________.

    (a)

    While

    (b)

    Do While

    (c)

    For

    (d)

    for each

  10. for (\(\$\) x=0; \(\$\) x<5; x++)
    echo “Hai”
    The above loop executes how many no of times?

    (a)

    5

    (b)

    4

    (c)

    3

    (d)

    2

*****************************************

Reviews & Comments about 12th Standard Computer Applications English Medium - Looping Structure 1 Mark Book Back Question Paper and Answer Key 2022 - 2023

Write your Comment