END TERM EXAMINATION | |
Second Semester[BCA] | June 2024 |
Paper Code: BCA-104 | Subject : Web Based Programming |
Time:3 Hour | Maximum Marks:60 |
Note: Attempt all questions as directed. Internal Choice is indicated. | |
Q1 Answer the following : (2*10=20) | |
(a) Difference between GET and POST Method. | |
(b) How is == different from === in PHP. | |
(c) Explain mail() function in PHP. | |
(d) What is the use of “$this” keyword in PHP? | |
(e) Difference between Var_dump() and print_r(). | |
(f) What are features of PDO. | |
(g) What are various OOP’s access modifiers. | |
(h) Explain explode(), krsort() and count() function. | |
(i) What do you understand by QueryString? | |
(j) What are file opening modes used with fopen() function in PHP. | |
UNIT I | |
Q2 (a) What are the advantages of PHP. What do you understand by Local Server and Remote Server. (5) | |
b) What are Super Global Variables in PHP. Explain in detail. (5) | |
Or | |
Q3 (a) What do you understand by Associative array? How associative array is different from indexed array? Write code to print the data of 2-D array in tabular form in PHP (5) | |
(b) Difference between i) Client side script & Server side script ii) Static Website and Dynamic Website (5) | |
UNIT-II | |
Q4 (a) Write a user defined function for swapping two variables using call by value and call by reference. Differentiate the output produced in both the methods. (5) | |
(b) What are different types of PHP errors? Explain by citing appropriate example. (5) | |
Or | |
Q5 (a) Explain Session and Cookies by giving suitable example. Write PHP script to count number of visitors visited a website in 24 hours using Session Variable. (5) | |
(b) Create a customer registration page “Customer.php” having fields like Name (Textbox), Gender (Radiobutton), Address (TextArea), Hobbies (Checkbox), City (Combobox),DOB (date) in it. Write a PHP script to submit this data on “Registered.php” page and print the received data there. (5) | |
UNIT-III | |
Q6 (a) Difference between include() and require(). Write code to read a file line by line and display it on web page. (5) | |
(b) Explain the following file handling functions. (i) fread() (ii) fgets() (iii) unlink (5) | |
or | |
Q7 (a) What do you understand by Object Oriented Programming. Explain various feature associated with objects giving example whenever possible. (5) | |
(b) Create a class “Employee” taking appropriate data members and member functions in PHP. Also create Constructor and Destructor for the same. (5) | |
UNIT IV | |
Q8 What are various dataype in MySQL. Write a PHP Script to create a database named “Gadgets” having table “Phone” with fields names P_Id, P_Company, P_Cost, P_Year. Write insert query for inserting records in “Phone” table and select query for retrieving the data. (5) | |
or | |
Q9 What are various constraints in MySql. Explain the following function :(5) i) Mysqli_connect() ii) Mysqli_connect_error() iii) Mysqli_query() iv) Mysqli_select_db() v) Fetch_array() |