You are on page 1of 2

AUGUST – PRE MONTHLY TEST

COMPUTER APPLICATION

Standard: 12
Duration: 1:30 Hours Marks: 50
PART -I
Choose the correct answer 10x1 =10
1. which one of the following should not be used while sending passwords or other sensitive information?
(a) GET (b) POST (c) REQUEST (d) NEXT
2. How many parameters are required for MYSQLi connect function in PHP?
(a) 2 (b) 3 (c) 4 (d) 5
3. What will be displayed in a browser when the following PHP code is executed?
<? Php
For ($i=1; $i<=5; i++)
{
Echo “$i”:
}
?>
(a) 1234 (b) 12345 (c)123 (d) None of the above

4. Which of the following functionsreads the entire contents of a file?


(a) fgets() (b) file_get_contents() (c)fread() (d) readfile()

5. Match the following:


For loop - Exit check loop
While loop - works only with array
For each loop - complicated looping structure
Do while loop - simple iteration logic

6. What will be displayed in a browser when the following PHP code is executed?
<? Php
For ($ counter =0; $ countr <=5; $counter ++)
{
Echo “Hello”;
}
?>
(a) Hello Hello Hello (b) Hello (c)Hello Hello Hello Hello Hello Hello (d) None of the above

7. When you use the $_GET variable to collect data, the data is visible to ________
(a) None (b) Only You (c) Every One (d) selected few

8. How PHP files can be accessed through?


(a) web browser (b) HTML files (c) Web server (d) all of the above

9. which is the correct function to execute the SQL queries in PHP?


(a) My sqli_query (“connection object”, SQL Query”)
(b) query (“connection object”, SQL Query”)
(c) My sql_query (“connection object”, SQL Query”)
(d) My sql_query SQL Query”)
10. Which is the correct function to establish connection in PHP?
(a) Mysqli_connect (“server name”, “user name”, “password”, “DB name”);
(b) connect (“server name”, “user name”, “password”, “DB name”);
(c) Mysql_connect (“server name”, “user name”, “password”, “DB name”);
(d) Mysqli_connect (“Database Object”);
PART – II

Answer the following (any 5 questions) 5x2=10


(Question number 13 is compulsory)
11. List out HTML control to support PHP language.
12. Compare for loop and foreach loop
13. What is foreach loop in PHP?
14. Difference between connection and close function
15. What are types of MySQLi function available in PHP?
16. Define mysqli_affected rows() function.
17. Define browse button in HTML.
PART –III
Answer the following (any 5 questions) 5x3 =15
(Question number 20 is compulsory)
18. Write the features of Forum Handling.
19. Write the purpose of GET method and POST method.
20. Write MySQL connection syntax with example
21. Write the purpose of My SQLi function available in PHP
22. DIFFERENTIATE BETWEEN While And Do While loop.
23. Write the features of Looping structure
24. Write short notes on File handling functions.

PART –IV
Answer the following in detail 3x5=15
25. Discuss in detail about For each loop. (OR)
Explain the Process of Do…While Loop.

26. Explain Form Handling Methods. . (OR)


Explain in detail of File Handling Functions.

27. Explain in detail type of MySQL connection method in PHP. (OR)


Discuss in detail about MySQL functions with Example.

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

You might also like