JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech III WEB TECHNOLOGIES Previous Question Paper (March - 2021 - R18)
Answer any five questions. All questions carry equal marks.
Main
Explain different types of arrays used in PHP with examples.
Answer
PHP supports three types of arrays:
- Indexed Arrays: Arrays with a numeric index. The index starts at 0 by default. Example:
$colors = array('Red', 'Green', 'Blue'); - Associative Arrays: Arrays that use named keys that you assign to them. Example:
$age = array('Peter' => '35', 'Ben' => '37'); - Multidimensional Arrays: Arrays containing one or more arrays. Example:
$cars = array(array('Volvo', 22, 18), array('BMW', 15, 13));
Write a PHP script to read and write into a file.
Answer
The following script demonstrates reading from and writing to a file using PHP file handling functions:
<?php
$filename = 'example.txt';
// Writing to a file
$file = fopen($filename, 'w');
fwrite($file, 'Hello, this is a test file.');
fclose($file);
// Reading from a file
if (file_exists($filename)) {
$file = fopen($filename, 'r');
echo fread($file, filesize($filename));
fclose($file);
}
?>What is XML DOM? How DOM parses the XML file?
Answer
Sign in to view the complete answer paper.
Explain different data types in XML schema.
Answer
Sign in to view the complete answer paper.
Demonstrate the use of cookies in servlets with an example.
Answer
Sign in to view the complete answer paper.
Describe how an HTTP Servlet handles its client requests.
Answer
Sign in to view the complete answer paper.
What are JSP Code snippets? Develop a JSP program to display current date and time.
Answer
Sign in to view the complete answer paper.
Discuss various implicit objects in JSP.
Answer
Sign in to view the complete answer paper.
Write a JavaScript to display whether given number is a prime or not.
Answer
Sign in to view the complete answer paper.
How do you create a function using function overloading?
Answer
Sign in to view the complete answer paper.
Differentiate between for and foreach statements in PHP with examples.
Answer
Sign in to view the complete answer paper.
Discuss the use of frames in creation of HTML document.
Answer
Sign in to view the complete answer paper.
Explain with suitable examples, the difference between get and post in Servlets.
Answer
Sign in to view the complete answer paper.
Describe the procedure for validating XML documents against a schema.
Answer
Sign in to view the complete answer paper.
How to create a Date object using JavaScript?
Answer
Sign in to view the complete answer paper.
What is CSS? Describe various methods to include CSS in webpage.
Answer
Sign in to view the complete answer paper.