Вы находитесь на странице: 1из 2

JECRC UNIVERSITY

End-Semester Examination, May 2017


BCA Semester VI
PHP Programming
Paper Code: BCA051A

Maximum Time: 3 hours. Maximum marks: 100


Instructions:

1. Attempt all the questions.

2. Illustrate your answers with suitable examples and diagrams, wherever necessary.

3. Write relevant question numbers before writing the answer.

Section-A[1 Marks each]


Q:1 Which of the following is/are a PHP code editor?
a) Notepad b) Notepad++ c) Adobe Dreamweaver d) All of the mentioned
Q:2 Which version of PHP introduced Try/catch Exception?
a) PHP 4 b) PHP 5 c) PHP 5.3 d) PHP 6
Q:3 What will be the output of the following php code?
<?php
$num=1;
$num1=2;
Print $num.+.$num1;
?>
a) 3 b) 1+2 c) 1.+.2 d) Error
Q:4 What will be the output of the following PHP code?
<?php
echochar(52);
?>
a) 1 b) 2 c) 3 d) 4
Q:5 Which of the functions is used to sort an array in descending order?
a) sort() b) asort() c) rsort() d) dsort()
Q:6 Which one of the following property scopes is not supported by PHP?
a) friendly b) final c) public d) static
Q:7 Which of the following is/are not an exception?
a) BadMethodCallException b) LogicException c) Domain Exception
b) All of the mentioned
Q:8 Which one of the following functions will convert a string to all uppercase?
a) strtoupper() b) uppercase() c) str_uppercase() d) struppercase()
Q:9 Which one of the following databases has PHP supported almost since the
beginning?
a) Oracle Database b) SQL c) SQL+ d) MySQL
Q:1 PHPs numerically indexed array begin with position __.
0 a) 1 b) 2 c) 0 d) -1
Section-B[2 Marks each]
Q.1. How Static scope is different from Local scope? Explain with the help of code.
Q.2. What are the common uses of php?
Q.3. What is purpose $_REQUEST variable?
Q.4. What is associated array?
Q.5. How to reverse a string without using strrev function in php?
Section-C[6 Marks each]
Q.1. Explain the following string functions with suitable code:-
a) Str_replace b) Strtoupper c) Strcasecmp d) substr
Q.2. Explain the following maths functions with suitable code:-
a) Ceil b) pow c) fmod d) floor
Q.3. Describe all operators in php?
Q.4. What do you understand by form validation?
Q.5. What do you understand by GET METHOD and POST METHOD?
Section-D[10 Mark each]
Q.1. Write a program to merge two associative array and sort that array in:-
a) Ascending order(in value form)
b) Descending order (in value form)
c) In key sorted form
Q.2. Explain any five array functions with suitable code?
Q.3. Write a program whether given name, gender, email, comment fields are mandatory?
Q.4. What do you understand by database? Explain how to create mysql database in php.
Q.5. What do you understand by session? Write program to create and destroy the session.

Вам также может понравиться