JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech III WEB PROGRAMMING Previous Question Paper (February - 2022 - R18)
Answer any five questions. All questions carry equal marks.
Main
How parameters are passed to functions in java script? Explain with example.
Answer
In JavaScript, parameters are passed to functions by value. However, the behavior depends on the data type being passed: primitive types (numbers, strings, booleans, null, undefined) are passed by value, meaning a copy of the actual data is created within the function scope. Objects, arrays, and functions are passed by reference, meaning the function receives a reference to the memory location of the object, allowing the function to modify the original object's properties.
Example:
function modify(val, obj) { val = 10; obj.name = 'Updated'; } let x = 5; let y = {name: 'Original'}; modify(x, y); console.log(x); // Outputs 5 (primitive unchanged) console.log(y.name); // Outputs 'Updated' (object modified)Write a java script to find the factorial of given number.
Answer
The following JavaScript code calculates the factorial of a given number using a recursive approach.
function factorial(n) { if (n === 0 || n === 1) { return 1; } return n * factorial(n - 1); } let num = 5; console.log('Factorial of ' + num + ' is ' + factorial(num));Alternatively, using an iterative approach:
function factorialIterative(n) { let result = 1; for (let i = 2; i <= n; i++) { result *= i; } return result; }What are the tools used in web site creation? Explain.
Answer
Sign in to view the complete answer paper.
Discuss in detail about various built in objects of Java Script.
Answer
Sign in to view the complete answer paper.
Describe the structure of a typical Java program with an example.
Answer
Sign in to view the complete answer paper.
What is a package? What do you understand from CLASSPATH environment variables?
Answer
Sign in to view the complete answer paper.
How do you design and implement an interface? Explain.
Answer
Sign in to view the complete answer paper.
How do we set priorities for threads? Describe the complete life cycle of a thread.
Answer
Sign in to view the complete answer paper.
Explain different types of JDBC drivers.
Answer
Sign in to view the complete answer paper.
Write the steps needed to connect to the database in java.
Answer
Sign in to view the complete answer paper.
Discuss about the highlighting features of java bean.
Answer
Sign in to view the complete answer paper.
Explain about InetAddress class and URL class.
Answer
Sign in to view the complete answer paper.
What is Servlet? Explain life cycle of a Servlet with a neat sketch.
Answer
Sign in to view the complete answer paper.
Write briefly about applet display methods.
Answer
Sign in to view the complete answer paper.
What are the various features of XML? Discuss.
Answer
Sign in to view the complete answer paper.
What are the standard protocols used in web service? Explain.
Answer
Sign in to view the complete answer paper.