JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech IV Year PHP PROGRAMMING Previous Question Paper (September - 2020 - R16)

B.Tech | IV Year | II Semester | R16 | September - 2020

Answer PaperPaper Code: 138GQMaximum Marks: 75Time: 2 Hours

Answer any Five Questions. All Questions Carry Equal Marks.

Main

115 marks
a

Is PHP a server side language or client side language? Explain your answer.

7 marks

Answer

PHP is a server-side scripting language. This means that PHP code is executed on the web server rather than in the user's web browser.

When a client requests a PHP file, the server processes the script, performs necessary operations such as database interactions or calculations, and generates HTML output. This resulting HTML is then sent to the client's browser, which only receives the final rendered output and has no access to the original PHP source code. This architecture enhances security and allows for dynamic content generation based on server-side data.

b

Write a function to swap two integers variables A & B without using any extra variable using PHP script.

8 marks

Answer

To swap two integer variables without using a third temporary variable, arithmetic operators such as addition and subtraction can be used. The following PHP script demonstrates this logic:

<?php
$a = 10;
$b = 20;

echo "Before swapping: A = $a, B = $b <br>";

$a = $a + $b;
$b = $a - $b;
$a = $a - $b;

echo "After swapping: A = $a, B = $b";
?>

The logic works by storing the sum of both numbers in the first variable, then subtracting the original value of the second variable from the sum to isolate the first value, and finally subtracting the new value of the second variable from the sum to isolate the second value.

215 marks
a

Explain about all conditional statements with suitable examples.

7 marks

Answer

Sign in to view the complete answer paper.

b

How to integrate a HTML web page with PHP?

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Illustrate parameterized and non-parameterized functions in PHP.

8 marks

Answer

Sign in to view the complete answer paper.

b

Write a PHP program for recursive functions.

7 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Explain the scope of different variables in PHP with suitable example.

7 marks

Answer

Sign in to view the complete answer paper.

b

Differentiate between system defined functions and user defined functions.

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Write a PHP script to read a file and copy the content into a new file.

8 marks

Answer

Sign in to view the complete answer paper.

b

Write PHP program for creating and deleting a folder.

7 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

What are FORMS? Explain different Form fields.

8 marks

Answer

Sign in to view the complete answer paper.

b

How to pass variables to multiple forms? Explain with suitable PHP script.

7 marks

Answer

Sign in to view the complete answer paper.

7

Write a PHP script to create an Image table and upload image into the table.

15 marks

Answer

Sign in to view the complete answer paper.

8

How to integrate PHP with MySQL server? Write a program using PHP to join two tables and retrieve the data.

15 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of PHP PROGRAMMING from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech ECE IV Year II Semester, September - 2020, R16.

For the question paper without answers, switch to the Question Paper tab.

Other papers in PHP PROGRAMMING

Loading Question Papers

Fetching data from database...