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. Why javascript is called a loosely typed language? What are the potential platforms where JavaScript can be used? [5]

3. Explain different ways to add javascript in an html file with example of each. [5]

4. Create an html form to accept user values from the user with proper validation using javascript. Validation should be as follows: [2+1+2] a) All the fields are required b) length of password should be a minimum 8 characters. c) on submit display information in alert box if validation is passed Explain MySQL Joins with an example query.

5. Define AJAX. How does it improve the performance of a web application?

6. Write the syntax and use of switch in JavaScript with an example.

7. Explain Exception Handling in PHP. Provide an example using try, catch, and finally.

8. Define and explain the concept of encapsulation in PHP. Provide an example code snippet to illustrate how encapsulation is implemented in a PHP class.

Group C

9. Explain the Document Object Model (DOM) in JavaScript. Discuss its role in event handling with examples.

10. Explain the concept of inheritance in PHP with proper example code and write its advantages in object-oriented programming.

11. Write down the PHP script to display data from a database table to a web page in the following format. Make your own assumption about the database connectivity.

Id Product Name Category Brand Quantity