Official 2024 board examination paper for the Scripting Language subject.
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 JS program to highlight all words over eight characters long in the paragraph text with a red background.
3. What is JavaScript? Explain different types of JavaScript with proper examples.
4. Write a PHP function that accepts a username and password as arguments and checks them against a student table. If credentials match, redirect to a dashboard page; otherwise, display 'Invalid username/password'.
5. What is jQuery? Explain the XMLHttpRequest object with its properties and methods with relevant examples.
6. What are Widgets? Explain the different features of a CMS.
7. Write the rules for creating a variable in PHP. How do you create, store, access, and destroy a session in PHP?
8. Write a short note on (any two): a) Types of arrays in PHP. b) Arrow functions in JavaScript. c) jQuery UI.
Group C
9. Write a server-side script to create and validate a form with specific rules and store the data into a 'patients' table with details (name, patientid, mobile, gender, address, dob, doctor name). Rules: Name, Mobile, Doctor name, Gender, DOB are required; Mobile must be 10 digits starting with 98, 97, or 96; DOB must be in YYYY-MM-DD format.
10. What is a JavaScript Event? Explain different methods available to access DOM elements using ID, class, name, and selector with suitable examples.
11. What is inheritance? Explain different ways to implement polymorphism in PHP with proper examples.