JNTU
JNTU B.Tech IV PHP PROGRAMMING Previous Question Paper (July - 2023 - R16)
Note: i) Question paper consists of Part A, Part B. ii) Part A is compulsory, which carries 25 marks. In Part A, Answer all questions. iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.
Part A
Write a PHP program to print 1 to 10 numbers using while loop.
Answer
The following PHP code initializes a variable to 1 and uses a while loop to print each number until it reaches 10:
<?php
$i = 1;
while ($i <= 10) {
echo $i . " ";
$i++;
}
?>Give a brief note on Apache Web server.
Answer
The Apache HTTP Server is a widely used, open-source, cross-platform web server software developed by the Apache Software Foundation. It is a fundamental component of the LAMP (Linux, Apache, MySQL, PHP) stack, which is the standard environment for hosting dynamic web applications.
Key characteristics include:
- Modular Architecture: Apache allows users to extend its functionality by loading or unloading modules, such as mod_rewrite for URL manipulation or mod_php for processing PHP scripts.
- Reliability and Security: It is highly stable and supports robust security features, including SSL/TLS encryption for secure data transmission via HTTPS.
- Configuration: It uses a centralized configuration file, typically named httpd.conf or .htaccess files, allowing developers to manage directory-level settings and access controls efficiently.
How to concatenate arrays in PHP?
Answer
Sign in to view the complete answer paper.
What is the function date () in PHP?
Answer
Sign in to view the complete answer paper.
Define pattern.
Answer
Sign in to view the complete answer paper.
How to use match function in PHP?
Answer
Sign in to view the complete answer paper.
Define exception.
Answer
Sign in to view the complete answer paper.
Write a short note on GD library.
Answer
Sign in to view the complete answer paper.
Define database.
Answer
Sign in to view the complete answer paper.
Explain any three features of MySQL database.
Answer
Sign in to view the complete answer paper.
Part B
Explain about comparison and string operators in PHP with suitable examples.
Answer
Sign in to view the complete answer paper.
Write a brief history on PHP.
Answer
Sign in to view the complete answer paper.
Explain about argument function and Variable function.
Answer
Sign in to view the complete answer paper.
How to create a PHP pages? Explain with an example.
Answer
Sign in to view the complete answer paper.
What are string functions in PHP? Explain in detail.
Answer
Sign in to view the complete answer paper.
How do you declare a function without arguments? Explain.
Answer
Sign in to view the complete answer paper.
Explain in detail about Parameterized function with an example program.
Answer
Sign in to view the complete answer paper.
When to define static functions? Explain.
Answer
Sign in to view the complete answer paper.
How to give input value in PHP? Explain with example.
Answer
Sign in to view the complete answer paper.
How do you read and write file in PHP? Give example.
Answer
Sign in to view the complete answer paper.
Explain how to create a folder in PHP.
Answer
Sign in to view the complete answer paper.
What are the advantages and define regular expression?
Answer
Sign in to view the complete answer paper.
How do you handle exceptions in PHP? Explain with an example.
Answer
Sign in to view the complete answer paper.
Discuss in detail about the parse errors.
Answer
Sign in to view the complete answer paper.
How to destroy cookies in PHP? Give example.
Answer
Sign in to view the complete answer paper.
Write a program to upload and display an image using PHP.
Answer
Sign in to view the complete answer paper.
How can you connect to database in PHP? Give example program.
Answer
Sign in to view the complete answer paper.
Explain the commands: CREATE, UPDATE, INSERT, DELETE, and SELECT.
Answer
Sign in to view the complete answer paper.
Explain the procedure to insert records into table in PHP with an example.
Answer
Sign in to view the complete answer paper.
Explain the process of running PHP script on a webserver.
Answer
Sign in to view the complete answer paper.