You are on page 1of 4

Faculty : Rana Ishtiaq Ahmad Batch Code : OV2016-04F

Exam : Exam IT 2 T-MARKS : 20


O-MARKS: Student Name :

1. Length of query string is restricted to _________ characters.

(A) 525 (B) 552 (C) 255 (D) 225

2. From Submission can be bookmarked in _____ method .

(A) GET (B) POST (c) BOTH (D) None

3. Varibales,constants,arrays and classes are called ____ in php.

(A) Keywords (B) identifiers (C) php essentials (D) None of These

4. Which of the following is defined using define() function.

(A) Global function (B) Global Variable (C)Constants (D)Arrays

5. When a variable retains its value even after the function terminates,is called___?

(A) Global (B) Local (C)Static (D)Super Global

6. Write a php script to print the name of the server host .

______________________________________________________________________
7. What is the output of the script?
<?php
$a=0;
$i=0;
for(;$i<10;$i++)
{
echo ++$a;
}
?>

(A) 123456789 (B) 012345678910 (C) 12345678910 (D) 0123456789

8. When a browser is closed,the already stored cookie will be destroyed.?


(A) Yes (B) No

9. <?php If(1==1)echo helo; ?> prints helo..?

(A) Yes (B) No

10. <?php If(1===1)echo helo; ?> prints helo..?

(A) Yes (B) No

11. output of this script ?


<?php

$a=$a;

$b=helo;

$a.=$b;

echo $a;

?>

(A) $ahelo (B) warning (C) Warning+helo (D) Error

12. We can control the execution of a loop using _____________?


(A) Break (B) Exit (C) Continue (D) All of These

13. <?php echo abs(-32.998); ?> will print.?

(A) -1 (B) 33 (C) -33 (D) 32.998

14. <?php echo "Next".strrev("".strtolower("L")."evel"); ?> will print?

(A) Error (B) Nextlevel (C) NextLevel (D) Next &a


warning

15. <?php echo getdate(); ?> output will be?

(A) current time date (B) Error (C) current time (D) current date

16. Output of this script..?


<?php function abc(){echo
"abc();";}
function xyz(){abc();}
function def(){xyz();}
function ghi(){def();}
function jkl(){ghi();}
jkl(); ?>

_______________________________________________________________

17. What is difference between Count() and SizeOf()?

18. Which function converts an arrays values to arrays index and vice versa?

(A) array_reverse (B) array_shift (C) array_flip (D) mirror_array

19. Write two functions of db to get query affected rows with a connection of $link?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
20. A browser cam maintain max ______ cookies.

(A) 200 (B) 300 (C) 400 (D) no limit

Do Something Today That Your Future Self Will Thank


You For

BEST OF LUCK

You might also like