New ! Computer Applications MCQ Practise Tests



PHP Conditional Statements Book Back Questions

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Applications

Time : 00:45:00 Hrs
Total Marks : 30
    5 x 1 = 5
  1. What will be the output of the following PHP code?
    < ? php
    \($\) x;
    if (\($\)x)
    print “hi” ;
    else
    print “how are u”;
    ? >

    (a)

    how are u

    (b)

    hi

    (c)

    error

    (d)

    no output

  2. Statement which is used to make choice between two options and only option is to be performed is written as

    (a)

    if statement

    (b)

    if else statement

    (c)

    then else statement

    (d)

    else one statement

  3. What will be the output of the following PHP code ?
    < ?php
    \($\)x = 10;
    \($\)y = 20;
    if (\($\)x > \($\)y + \($\)y != 3)
    print “hi” ;
    else
    print “how are u”;
    ? >

    (a)

    how are u

    (b)

    hi

    (c)

    error

    (d)

    no output

  4. What will be the output of the following PHP code ?
    < ?php
    \($\)x = 10;
    \($\)y = 20;
    if (\($\)x > \($\)y && 1||1)
    print “hi” ;
    else
    print “how are u”;
    ? >

    (a)

    how are u

    (b)

    hi

    (c)

    error

    (d)

    no output

  5. What will be the output of the following PHP code ?
    < ?php
    if (-100)
    print “hi” ;
    else
    print “how are u”;
    ? >

    (a)

    how are u

    (b)

    hi

    (c)

    error

    (d)

    no output

  6. 3 x 2 = 6
  7. What are the different types of conditional statements in PHP?

  8. What is the purpose of the if ... else statement?

  9. Write the Syntax of an If ... else statement in PHP.

  10. 3 x 3 = 9
  11. Write the features Conditional Statements in PHP.

  12. Write Short notes on Switch statement

  13. Write, a PHP program to display independenc day and republic day the greetings using If elseif else statement.

  14. 2 x 5 = 10
  15. Explain the Function of Conditional Statements in PHP.

  16. Explain the working of Conditional Statements in PHP?

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

Reviews & Comments about 12th Standard Computer Applications Unit 6 PHP Conditional Statements Book Back Questions

Write your Comment