New ! Computer Applications MCQ Practise Tests



Looping Structure Model Question Paper

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Applications

Time : 00:45:00 Hrs
Total Marks : 40
    5 x 1 = 5
  1. Loops that iterate for fixed number of times is called

    (a)

    Unbounded loops

    (b)

    Bounded loops

    (c)

    While loops

    (d)

    For loops

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

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

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

    (a)

    foreach

    (b)

    for

    (c)

    while

    (d)

    do..while

  5. ________ loops execute a block of code a specified number of times.

    (a)

    foreach

    (b)

    for

    (c)

    while

    (d)

    do..while

  6. 5 x 2 = 10
  7. Write Syntax of For each loop in PHP.

  8. Write Syntax of Do while loop in PHP.

  9. Compare For loop and for each loop.

  10. How do..while loop differs form other loop?

  11. Why looping structure is necessary in programming an uages?

  12. 5 x 3 = 15
  13. Write the purpose of Looping Structure in PHP

  14. Differentiate For each and While loop.

  15. Differentiate While and Do while loops.

  16. Write a PHP program to display color names "using foreach" loop

  17. Write a PHP program to display the following

  18. 2 x 5 = 10
  19. Explain Looping Structure in PHP.

  20. Explain the process Do while loop.

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

Reviews & Comments about 12th Computer Applications - Looping Structure Model Question Paper

Write your Comment