Official 2025 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 JavaScript program to accept n integers into an array, calculate and display the sum and average of the numbers, and find the largest number among them.

3. PHP and JavaScript are both programming languages that generate dynamic results for web pages. What is their main difference, and why would you use both of them?

4. Explain event handling in JavaScript. What is the difference between the map and forEach methods in JavaScript?

5. What is jQuery? Explain any four jQuery effect methods with examples.

6. Write the necessary scripts to check for unique phone numbers in a 'students' table without reloading the webpage using AJAX.

7. What is the use of the $_FILES array? Explain different types of arrays available in PHP.

8. Why is the error reporting function important for PHP applications? Explain how cookies are stored, accessed, and destroyed using server-side PHP scripts.

Group C

9. What are the major features of a CMS? Implement an interface in PHP with specific properties (radius for a Circle class, side for a Square class, and base/height for a Triangle class) to ensure that multiple classes define their own implementation of the calculateArea method, utilizing these properties in their calculations.

10. Create a webpage with a form for a BCA entrance exam, including fields for name, email, mobile number, password, gender, intermediate faculty, and date of birth. Store the entered data in the MySQL database 'FOHSS' in the table 'BCA', and validate the form using JavaScript with these rules: i. All fields are mandatory. ii. Must follow valid formats (proper email address and 10-digit mobile number). iii. Date of birth must follow YYYY-MM-DD format.

11. Write a JavaScript program to create and design a calculator with the following features: When the user presses numbers or arithmetic operators, it should append to the input bar. When the user presses the equals (=) button, the entered value should be calculated and displayed.