Breaking News

BCA 5th Semester: Web Based Programming with PHP - Q Paper (2013)

END TERM EXAMINATION 

FIFTH SEMESTER BCA DECEMBER (2013)


Paper Code: BCA313 Subject: Web Based Programming (2011 onwards)
Time: 3 Hours                                                                     Maximum Marks: 75
Note: Attempt any five questions including Q No. 1 which is compulsory. 
Select one question from each section.
Q1. Do the Following:
(a) Differentiate between static and dynamic web page.

(b) How can you incorporate one PHP file within another with example?

(c) What is garbage collection and type juggle in PHP?

(d) What is session, how session is created and destroyed?

(e) What is printf function differentiate between echo and print statement in PHP?

(f) How can you submit a form without displaying it in browser? Which associative array is used to pass data to PHP?

(g) Name three conditional statements in PHP. When would you use the === operator?

(h) What are different types of errors in PHP?

(i) How can we get the properties (size, type, width, height) of an image using PHP image functions?

(j) What is query string? Give example in PHP?
(10*2.5 = 25)
UNIT - I
Q2: (a) What is web application? Differentiate between client side scripting and server side scripting.
(b) What is web server? Differentiate between local and remote server?
(c) What is the difference between WAMP, MAMP and LAMP?
7

2.5
3
OR
Q3: (a) PHP being an open source, is there any support available to it? How does the web server interpret PHP and interact with client.
(b) PHP and Javascript both are programming languages that generate dynamic results for web pages. What is the main difference and why would you use both of them?
(c) Write down the steps for installation of Apache, IIS and PWS in windows OS.
2.5

1.5

8.5
UNIT - II
Q4: (a) What is PHP. Explain data types and variables in PHP. What is the difference between $msg and $$msg?
(b)What is the scope of variable. List and explain all scope of variable and super Globals variable in PHP with example.
(c)Define constants in PHP with example. What are implicit casting and explicit casting in PHP?
4.5

5.5

2.5
OR
Q5. (a) Differentiate numeric and associative array with example. Write a PHPP script to create a multidimensional array.
(b) What is foreach and each in PHP? Write a PHP program for passing by value and passing by reference?
(c) Explain following array function with the help of example:
     i.  assort  ii. explode   iii. compact  iv. reset    v. is_array
3

4.5

5
UNIT III
Q6. (a) Write a PHP code to design a registration form according to given field :name, E-mail, phone number and comment, and apply form validation on name, email and phone number, also make a button to send the data.
(b) What are cookies? How can you create, access and delete a-cookie in pHp with the help of example.
8
4.5
OR
Q7. (a) Write a PHP-script to open, close, read and write into a file. (Answer)
(b) What is File Handling in PHP? Write a PHP script to upload a file.
(c) What is HTTP application state?
7

3

2.5
UNIT-IV
Q8. (a) What is MySQL? What are the different data types in MySQL? Explain each of them with suitable example.(b) Write connectivity and selecting database statement which is used to connect PHP with MySQL.(c)In how many ways we can retrieve the data in the result set of MySQL using PHP? What is the difference between mysql_fetch_object and mysql_fetch_array? 5.5.

3.5

3.5
OR
Q9. (a) Write a PHP script to create a database Course and create a student table with in the database with field i.e. student-id, student name, student age. Insert maximum two records and select all records of student table.
(b) Write a PHP script to insert records of student table through Form and display records in table format.
7.5


5