BCA 4th Semester Scripting Language Past Questions

Tribhuvan University · BCA Semester IV

BCA 4th Semester Scripting Language Past Questions

Tribhuvan University BCA Semester IV Scripting Language past questions from 2020, 2021 and 2023, covering JavaScript, PHP, jQuery, AJAX, HTML, MVC, OOP, forms, validation, database programming and WordPress.

Scripting LanguageCACS254Semester IVFull Marks: 60Pass Marks: 243 Hours
Exam pattern: Group B contains six questions for 30 marks and Group C contains two questions for 20 marks. The page preserves the questions supplied by you. Minor OCR/typing errors have been normalized where the intended wording is clear.

Scripting Language Past Questions 2020

CACS254 · Semester IV
60 Marks · Pass 24 · 3 Hours

Group B

Attempt any SIX · 6 × 5 = 30
2. What is JavaScript? What are the potential platforms where JavaScript can be used? [1+4]
3. Define JavaScript event. Illustrate how an event handler responds to a particular event in a web page. [1+4]
4. What is an Immediately Invoked Function Expression (IIFE) in JavaScript? Explain with a suitable example. [1+4]
5. Explain an array using a suitable example and discuss how the foreach loop accesses elements stored in an array using PHP. [2+3]
6. What is jQuery? Illustrate different types of selectors in jQuery with appropriate examples. [1+4]
7. What is the benefit of using AJAX? Discuss major methods that communicate with server-side scripting. [1+4]
8. Discuss MVC architecture with an appropriate diagram. [5]

Group C

Attempt any TWO · 2 × 10 = 20
9.
  • a) Write a program which includes a function sum(). The function should add an arbitrary list of parameters. For example, sum(1,2) returns 3 and sum(1,3,4) returns 8. [5]
  • b) Write a program that displays continuous time on a web page in the format HH:MM:SS. [5]
10. Define method overriding. Write a PHP program to handle the overriding situation. [2+8]
11. Design the given form in HTML and write corresponding PHP and SQL code for CRUD operations based on user data. Assume your own database and database connectivity constraints if necessary. [10]

Scripting Language Past Questions 2021

CACS254 · Semester IV
60 Marks · Pass 24 · 3 Hours

Group B

Attempt any SIX · 6 × 5 = 30
2. Explain features of JavaScript. [5]
3. What is NaN in JavaScript? Write JavaScript code to change the background color of a web page every second. [1+4]
4. What is an arrow function? Write JavaScript code to calculate the factorial of a given number using an arrow function. [1+4]
5. Write a program to create a chess board in PHP using a loop. [5]
6. Write jQuery code to include date-picker controls in an HTML text box. [1+4]
7. Write a JavaScript program to retrieve any value from a server-side script using AJAX. [5]
8. What is a constructor? How do you implement a constructor in PHP? [5]

Group C

Attempt any TWO · 2 × 10 = 20
9. What are the advantages of inheritance? Write a PHP program to illustrate the concept of function overloading. [2+8]
10. Write HTML and JavaScript code to create a calculator for performing basic arithmetic operations. [10]
11. Design the given form in HTML and write a corresponding server-side script to upload and submit user data into a database, considering the following validation rules:
  • Registration number, email and uploaded file are mandatory.
  • Email address should be in proper email format.
  • Uploaded file must use an allowed format such as PDF, DOC, DOCX, PPT, PPTX or JPEG.
  • File size must be less than 5 MB.

Scripting Language Past Questions 2023

CACS254 · Semester IV · Batch 2020
60 Marks · Pass 24 · 3 Hours

Group B

Attempt any SIX · 6 × 5 = 30
2. What is the need for client-side scripting? Write a JavaScript program that accepts the user’s first and last name and prints them in reverse order with a space between them. [1+4]
3. Write HTML code to design a form with four radio buttons: green, red, blue and black. Write JavaScript code that changes the background color of the page when the user clicks a particular button. [2+3]
4. What do you mean by a superglobal variable in PHP? How do you read and write a CSV file in PHP? Explain with a suitable example. [2+3]
5. What is an associative array? Write a PHP program to create a multidimensional array that holds marks in Operating System, Scripting, Numerical Methods, DBMS and Software Engineering for three students—Aashis, Jayanti and Niraj. Then display the average marks of each student. [1+4]
6. What is the use of inheritance? Write an object-oriented PHP program to define a Person class and derive Student and Employee classes from it to demonstrate hierarchical inheritance. [1+4]
7. What is the syntax to create an AJAX object? Design and develop a dynamic web application using HTML, AJAX and PHP. [1+4]
8. What is the difference between a WordPress theme and template? Write the steps to add and edit pages in WordPress. [2+3]

Group C

Attempt any TWO · 2 × 10 = 20
9. What are different ways to include JavaScript in an HTML document? Create an HTML page containing a division with an image and its description in a paragraph. Write a JavaScript function to change the value of the description during onmouseover and onmouseout on the image. [3+7]
10. Design an HTML registration form containing text boxes for Name and Email, a radio button for Gender, and a selection list for Education. Write a PHP script to validate the input and store the data from the form into a database using a database connection and appropriate query. [3+3+4]
11. How is jQuery different from JavaScript? Discuss different types of jQuery selectors with examples. [4+6]

BCA 4th Semester Scripting Language Exam Preparation

Important recurring areas include JavaScript events and functions, PHP arrays and OOP, inheritance, constructors, jQuery selectors, AJAX, MVC, HTML forms, validation, file uploads, database connectivity, CRUD operations and WordPress basics.

More eSikhcha resources: BCA 4th Semester Study Materials · BCA Study Materials · Tribhuvan University Resources.