New ! Computer Applications MCQ Practise Tests

12th Standard Computer Applications PHP Conditional Statements English Medium Free Online Test One Mark Questions 2020 - 2021

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Applications

Time : 00:09:00 Hrs
Total Marks : 9

    Answer all the questions

    9 x 1 = 9
  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

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

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

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

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

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

TN 12th Standard Computer Applications free Online practice tests

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

Write your Comment