Pre-Board examination question paper set for Scripting Language from the year 2025.

Tribhuvan University
Faculty of Humanities & Social Sciences
OFFICE OF THE DEAN
2025
Bachelor in Computer Applications

Paper detail Value
Course Scripting Language
Code No. CACS254
Semester IVth
Full marks 60
Pass marks 24
Time 3 hours

Candidates are required to answer the questions in their own words as far as possible.

Group B

2. Write a JavaScript program to highlight all the words having more than six characters in a paragraph using a yellow background.

3. What is JavaScript? Explain different data types used in JavaScript with suitable examples.

4. Write a PHP function that accepts email and password as parameters and verifies them from a user table. If valid, redirect to the home page; otherwise display an error message.

5. What is jQuery? Explain the XMLHttpRequest object and its ready states with a relevant example.

6. What is CMS? Explain different features of a Content Management System.

7. Write rules to declare variables in PHP. How do you create, access, and destroy cookies in PHP?

8. Write short notes on (any two): a) Types of Array in PHP b) Anonymous function in JavaScript c) jQuery UI

Group C

9. Write a server-side PHP script to create and validate a form and store the given data into a patients table with the following fields: (name, patient_id, mobile, gender, address, dob, doctor_name)

10. Apply the following validation rules:

11. Name, Mobile, Doctor Name, Gender, DOB: Required

12. Mobile number must be 10 digits and start with 98, 97, or 96

13. DOB must be in YYYY-MM-DD format.

14. What is a JavaScript Event? Explain different methods available to access DOM elements using id, class, name, querySelector with suitable examples.

15. What is Inheritance? Explain different ways to implement polymorphism in PHP with proper examples.