Jawaharlal Nehru Technological University Hyderabad

Jawaharlal Nehru Technological University Hyderabad B.Tech IV PHP Programming Previous Question Paper (July - 2021 - R16)

B.Tech | IV | II | R16 | July - 2021

Answer PaperPaper Code: 138GQMaximum Marks: 75Time: 3 hours

Answer any Five Questions. All Questions Carry Equal Marks.

Main

115 marks
a

What are the different types of operators used in PHP? Explain.

8 marks

Answer

PHP supports a wide range of operators to perform operations on variables and values. The primary types include:

  • Arithmetic Operators: Used for mathematical calculations such as addition (+), subtraction (-), multiplication (*), division (/), modulus (%), and exponentiation (**).
  • Assignment Operators: Used to assign values to variables, such as =, +=, -=, *=, /=, and %=.
  • Comparison Operators: Used to compare two values, including equal (==), identical (===), not equal (!= or <>), not identical (!==), greater than (>), less than (<), greater than or equal to (>=), and less than or equal to (<=).
  • Increment/Decrement Operators: Used to increase or decrease a variable's value by one, such as pre-increment (++$a), post-increment ($a++), pre-decrement (--$a), and post-decrement ($a--).
  • Logical Operators: Used to combine conditional statements, such as AND (&& or and), OR (|| or or), XOR (xor), and NOT (!).
  • String Operators: Used specifically for strings, including the concatenation operator (.) and the concatenation assignment operator (.=).
  • Array Operators: Used to compare arrays, such as union (+), equality (==), identity (===), inequality (!= or <>), and non-identity (!==).
  • Conditional Assignment Operators: Includes the ternary operator (?:) and the null coalescing operator (??).
b

Explain in detail about various types of loops used in PHP.

7 marks

Answer

Loops in PHP are used to execute the same block of code a specified number of times or while a condition is true. The main types are:

  • while loop: Executes a block of code as long as the specified condition is true. The condition is evaluated before the execution of the loop body.
  • do...while loop: Similar to the while loop, but it executes the code block once before checking the condition. This ensures the code runs at least once.
  • for loop: Used when the number of iterations is known beforehand. It consists of three expressions: initialization, condition, and increment/decrement.
  • foreach loop: Specifically designed for iterating over arrays. It loops through each key-value pair in an array, making it highly efficient for data processing without needing to manage index counters manually.
215 marks
a

Explain about file handling functions in PHP.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write about, i) Parameterized function ii) Non parameterized function.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Explain the steps to create and delete a file in PHP.

8 marks

Answer

Sign in to view the complete answer paper.

b

How to read and write a file in PHP? Explain.

7 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Explain in detail file types with GD and PHP.

8 marks

Answer

Sign in to view the complete answer paper.

b

Describe steps to create the image table.

7 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Explain MySQL commands in brief.

6 marks

Answer

Sign in to view the complete answer paper.

b

Describe the process of working with PHP and arrays of data.

9 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Explain the relationship between Apache, MySQL and PHP.

8 marks

Answer

Sign in to view the complete answer paper.

b

Differentiate between user defined function and systems defined function.

7 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

How to pass variables between pages? Explain.

6 marks

Answer

Sign in to view the complete answer paper.

b

Explain how to connect to the MySQL server with an example program.

9 marks

Answer

Sign in to view the complete answer paper.

8

Write short notes on:

15 marks
a

Exceptions

7 marks

Answer

Sign in to view the complete answer paper.

b

Destroying cookies.

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of PHP Programming from Jawaharlal Nehru Technological University Hyderabad for B.Tech EEE IV II, July - 2021, R16.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in PHP Programming

Loading Question Papers

Fetching data from database...