New ! Computer Applications MCQ Practise Tests



12th Standard English Medium Computer Applications Subject PHP Conditional Statements Book Back 1 Mark Questions with Solution Part - I

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Applications

Time : 01:00:00 Hrs
Total Marks : 5

    1 Marks

    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. What will be the output of the following PHP code ?
    < ?php
    \($\) x = 0;
    if (\($\)x++)
    print “hi”;
    else
    print “how are u”;
    ? >

    (a)

    hi

    (b)

    no output

    (c)

    error

    (d)

    how are u

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

    (a)

    how are uhello

    (b)

    hihello

    (c)

    hi

    (d)

    no output

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

  5. What will be the output of the following PHP code ?
    < ?php
    \($\) a = “”;
    if (\($\)a)
    print “all”;
    if______
    else
    print “some”;
    ? >

    (a)

    all

    (b)

    some

    (c)

    error

    (d)

    no output

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

Reviews & Comments about 12th Standard English Medium Computer Applications Subject PHP Conditional Statements Book Back 1 Mark Questions with Solution Part - I

Write your Comment