1. Question: printf("Bar inventory: %d bottles of tonic tea.", 100);

    A
    Bar inventory: 100 bottles of tonic tea.

    B
    Bar inventory: 1000 bottles of tonic tea.

    C
    Bar inventory: 10 bottles of tonic tea.

    D
    Bar inventory: .100 bottles of tonic tea.

    Note: Not available
    1. Report
  2. Question: whice statement are correct?

    A
    %b means Argument considered an integer; presented as a binary number

    B
    %d means Argument considered an integer; presented as a signed decimal number

    C
    %s means Argument considered a string; presented as a string

    D
    %o means Argument considered an integer; presented as an octal number

    Note: Not available
    1. Report
  3. Question: printf("%d bottles of tonic water cost $%f", 100, 43.20); Executing this command produces the following:

    A
    100 bottles of tonic water cost $43.200000

    B
    100 bottles of tonic water cost $43.20000

    C
    100 bottles of tonic water cost $43.200

    D
    100 bottles of tonic water cost $43.2

    Note: Not available
    1. Report
  4. Question: $score = (double) 13 echo $score; Output?

    A
    13.0

    B
    13.00

    C
    13

    D
    00.13

    Note: Not available
    1. Report
  5. Question: $score = (int) 14.8; echo $score; Output?

    A
    14

    B
    14.00

    C
    0.14

    D
    14.0

    Note: Not available
    1. Report
  6. Question: $sentence = "This is a sentence"; echo (int) $sentence; Output?

    A
    0

    B
    sentence

    C
    This is a sentence

    D
    00.00

    Note: Not available
    1. Report
  7. Question: $score = 1114; $scoreboard = (array) $score; echo $scoreboard[0];

    A
    1114

    B
    11,14

    C
    11 14

    D
    4111

    Note: Not available
    1. Report
  8. Question: <?php $val1 = "1.2"; $val2 = 2; echo $val1 * $val2; ?> outputs?

    A
    2.4

    B
    24

    C
    1.24

    D
    41.2

    Note: Not available
    1. Report
  9. Question: <?php $item = 43; printf("The variable $item is of type integer: %d \n", is_integer($item)); printf("The variable $item is of type array: %d \n", is_array($item)); printf("The variable $item is numeric: %d \n", is_numeric($item)); ?> This code returns the following:

    A
    The variable $item is of type integer: 1 The variable $item is of type array: 0 The variable $item is numeric: 1

    B
    The variable $item is of type array: 0 The variable $item is of type integer: 1 The variable $item is numeric: 1

    C
    The variable $item is of type array: 0 The variable $item is of type integer: 1 The variable $item is numeric: 0

    D
    The variable $item is of type array: 0 The variable $item is of type integer: 1 The variable $item is numeric.

    Note: Not available
    1. Report
  10. Question: What means ($a == 12) ? 5 : -1?

    A
    If $a equals 12, return value is 5; Otherwise, return value is –1

    B
    If $a equals 12, return value is -1; Otherwise, return value is 5

    C
    If $a equals 5, return value is 12; Otherwise, return value is –1

    D
    If $a equals -1, return value is 5; Otherwise, return value is 12

    Note: Not available
    1. Report
Copyright © 2025. Powered by Intellect Software Ltd