New ! Computer Applications MCQ Practise Tests



12th Standard Computer Applications Looping Structure English Medium Free Online Test One Mark Questions 2020 - 2021

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Applications

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

    Answer all the questions

    10 x 1 = 10
  1. Most complicated looping structure in PHP is ________

    (a)

    While

    (b)

    Do While

    (c)

    for

    (d)

    None of them

  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 = 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

  4. PHP supports which types of looping techniques;

    (a)

    for loop

    (b)

    while loop

    (c)

    foreach loop

    (d)

    all the above

  5. 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

  6. 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

  7. 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

  8. The ________ construct provides an easy way to iterate over arrays

    (a)

    foreach

    (b)

    for

    (c)

    while

    (d)

    do..while

  9. Which of the following is an entry check loop?

    (a)

    foreach

    (b)

    for

    (c)

    while

    (d)

    do..while

  10. What will be displayed in a browser when the following PHP code is executed:
    < ?php
    for ($i=1;$i<=5; $i++)
    {
    echo "$i";
    }
    ? >

    (a)

    12345

    (b)

    1234

    (c)

    123

    (d)

    None of the above

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

Reviews & Comments about 12th Standard Computer Applications Looping Structure English Medium Free Online Test One Mark Questions 2020 - 2021

Write your Comment