Students can Download Computer Applications Chapter 4 Introduction to Hypertext Pre-Processor Questions and Answers, Notes Pdf, Samacheer Kalvi 12th Computer Applications Book Solutions Guide Pdf helps you to revise the complete Tamilnadu State Board New Syllabus and score more marks in your examinations.

Tamilnadu Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Samacheer Kalvi 12th Computer Applications Introduction to Hypertext Pre-Processor Text Book Back Questions and Answers

PART – I
I. Choose The Correct Answer

Question 1.
What does PHP stand for?
(a) Personal Home Page
(b) Hypertext Preprocessor
(c) Pretext Hypertext Processor
(d) Pre-processor Home Page
Answer:
(b) Hypertext Preprocessor

Question 2.
What does PHP files have a default file extension?
(a) html
(b) xml
(c) .php
(d) ph
Answer:
(c) .php

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 3.
A PHP script should start with ……………………. and end with …………………….
(a) <php>
(b) < ? php ?>
(c) < ? ? >
(d) < ?php ? >
Answer:
(d) < ?php ? >

Question 4.
Which of the following must be installed on your computer so as to mn PHP script?
(a) Adobe
(b) windows
(c) Apache
(d) IIS
Answer:
(c) Apache

Question 5.
We can use ………………….. to comment a single line?
(i) /?
(ii) 11
(iii) #
(iv) /* */
(a) Only (ii)
(b) (i), (iii) and (iv)
(c) (ii), (iii) and (iv)
(d) Both (ii) and (iv)
Answer:
(c) (ii), (iii) and (iv)

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 6.
What will be the output of the following PHP code?
Ans
< ?php
$num =1;
$num1 =2;
print $num . $num1 ;
?>
(a) 3
(b) 1+2
(c) 1.+.2
(d) Error
Answer:
(a) 3

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 7.
Which of the following PHP statements Will output Hello World on the screen?
(a) echo (“Hello World”)
(b) print (“Hello World”)
(c) printf (“Hello World”)
(d) sprintf (“Hello World”)
Answer:
(a) echo (“Hello World”)

Question 8.
Which statement will output $x on the screen?
(a) echo “\$x”
(b) echo “$$x”
(c) echo “/$x”
(d) echo “$x
Answer:
(a) echo “\$x”

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 9.
Which of the below symbols is a newline character?
(a) \r
(b) \n
(c) /n
(d) /r
Answer:
(b) \n

PART – II
II. Short Answers

Question 1.
What are the common usages of PHP?
Answer:

  1. It is very simple and lightweight open source server side scripting language.
  2. It can easily embed with HTML and other client side scripting languages like CSS (Cascading Style Sheets) and Java script.
  3. It also creates dynamic and interaction Webpages in the red time Web development projects.

Question 2.
What is Webserver?
Answer:
Web server software is available as open source or licensed version in the market. A Web server is a Software that uses HTTP (Hypertext Transfer Protocol) to serve the files that form Web pages to users.

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 3.
What are the types scripting language?
Answer:
Web scripting languages are classified into two types, client side and server side scripting language. PHP is completely different from Client side scripting language like Java script. The PHP code entirely executes on Webserver which is installed in the remote machine.

Question 4.
Difference between Client and Server?
Answer:
The server is a high performance hardware machine it could run more than one application concurrently. The client is a separate hardware machine which is connected with server in the network (Intemet/intranet). It could send the request and receive the response from the server hardware. The Server and client are also called as service provider and service requester respectively.

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 5.
Give few examples of Web Browser?
Answer:
Internet Explorer
UC Browser
Opera
Google Chrome and
Mozilla Firefox.

Question 6.
What is URL?
Answer:
URL: Uniform Resource Locator, the address of a specific Web page or file on the Internet. Eg. http://example.com

Question 7.
Is PHP a case sensitive language?
Answer:
Yes, smaller case & uppercase letters are different in PHP.

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 8.
How to declare variables in PHP?
Answer:
The variable in PHP begins with a dollar ($) symbol and the assignment activity implemented using “=” operator, finally the statement ends with semi colon The semicolon indicates the end of statement.
$a=5; $b=T0;

Question 9.
Define Client Server Architecture?
Answer:
The client server architecture introduces application sharing mechanism between two different hardware systems over the network (Intemet/intranet).

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 10.
Define Webserver?
Answer:
Web server software is available as open source or licensed version in the market.
A Web server is a Software that uses HTTP (Hypertext Transfer Protocol) to serve the files that form Web pages to users.

PART – III
III. Explain in Brief Answer

Question 1.
Write the features of server side scripting language?
Answer:

  1. The server is a high performance hardware machine it could run more than one application concurrently.
  2. Most of the server side scripting languages are working on any one the client server architecture model.
  3. Webserver is software which is running in server hardware.
  4. It takes the responsibilities for compilation and execution of server side scripting languages.

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 2.
Write is the purpose of Web servers?
Answer:

  1. Webserver is software which is running in server hardware.
  2. It takes the responsibilities for compilation and execution of server side scripting languages.
  3. After receiving the request from client machine the Web server tries to compile and interpret the PHP code which is available in remote machine.
  4. Next a response will be generated and sent back to the client machine over the network from Webserver.

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 3.
Differentiate Server side and Client Side Scripting language?
Answer:
Server Side Scripting Language:

  1. Server is a high performance hardware machine. It could run more than one application concurrently.
  2. The server is the service provider.
  3. Ex. Php. Asp.net, Python, Cold Fusion
  4. It is relatively secure

Client Side Scripting Language:

  1. The client is a separate hardware machine which is connected with server in the network.
  2. The client is the service requester
  3. html, css, Javascript
  4. Insecure

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 4.
In how many ways you can embed PHP code in an HTML page?
Answer:

  1. PHP script can be written in side of HTML code and save the file with extension of .php. The embedded PHP file get executed in the Webserver, the browser receives only the HTML and other client side files.
  2. Php files can also be embedded with css and js files.
  3. Using template engines like Smarty, DWOO, Mustache, Blade we can embed php files.

Question 5.
Write short notes on PHP operator?
Answer:
Operator is a symbol which is used to perform mathematical and logical operations in the programing languages. Different types of operator in PHP are:

  1. Arithmetic operators
  2. Assignment operators
  3. Comparison operators
  4. Increment/Decrement operators,
  5. Logical operators, and
  6. String operators.

PART – IV
IV. Explain in detail

Question 1.
Explain client side and server side scripting language?
Answer:

  1. PHP (Hypertext Pre-processor) is a one of the important server side Web and general purpose scripting language invented by Rasmus Lerdorf in 1994.
  2. It is very simple and lightweight open source server side scripting language.
  3. It can easily embed with HTML and other client side scripting languages like CSS (Cascading Style Sheets) and Java script.
  4. It also creates dynamic and interactive Webpages in the real time Web development projects
  5. Web scripting languages are classified into two types, client side and server side scripting language.
  6. PHP is completely different from Client side scripting language like Java script.
  7. The PHP code entirely executes on Webserver which is installed in the remote machine and it is generating HTML code which is sent to the user.
  8. The user receives the HTML code and sees the Website contents via Internet browser in their computer or laptop.
  9. PHP also supports OOPs (Object Oriented Programing) concepts. It is applicable to implement all OOPs features such as class, object and inheritance etc. The action is shown in Figure.

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 1

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 2.
Discuss in detail about Website development activities?
Answer:
The process of development also includes Web content generation, Web page designing, Website security and so on.
PHP Script:
1. Website or Web page is developed by the programmer using PHP script. Finally the entire Website codes are moved to Web server path in a remote server machine.

2. From client side, the end user opens a browser, types the URL of the Website or Webpage and initiates the request to remote server machine over the network.

3. After receiving the request from client machine the Web server tries to compile and interpret the PHP code which is available in remote machine.

4. Next a response will be generated and sent back to the client machine over the network from Webserver.

5. Finally the browser which is installed in the client machine receives the response and displays the output to user.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 2

Question 3.
Explain the process of Webserver installation?
Answer:
Web server software that runs on server hardware, governs the server side scripting compilation into an intermediate byte-code that is then interpreted by the runtime engine.

Web server software is available as open source or licensed version in the market. Recent statistics of Web server usage depict that more than 130% Websites are running under the open source Web servers such as Tomcat Apache, Nginx etc. The following are the steps to install and configure Apache Httpd Webserver and PHP module in windows server machine.

Step 1:
Go to Apache foundation Website and download the Httpd Webserver Software.
https://httpd.apache.org/download.cgi

Step 2:
After downloading .MSI file from Apache foundation Website, user launches the. MSI file and clicks next and next button to finish the installation on server machine. The software takes default port number 130 or 130130. Once the user finished, the Web server software is installed and configured on server hardware machine as a service.

Step 3:
To test the installation of Apache Httpd Webserver, enter the following URL from your Web browser which is installed in your client machine.
https://localhost:130/ or https://localhost: 130130 The output page that says “Its works”

Step 4:
Administrator user can start, stop and restart the Web server service at any time via windows Control panel. Once the services stops, the client machine will not receive the response message from server machine.

Step 5:
Webserver’s configuration setting “httpd.conf” file is located in the conf directory under the apache installation directory. Edit this file and enable the PHP module to run PHP scripting language.

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 4.
Discuss in detail about PHP data types?
Answer:
PHP Data type:
PHP scripting language supports 13 primitive data types. Data Types plays important role in all programing languages to classify the data according to the logics. PHP supports the following data types.

  1. String
  2. Integer
  3. Float
  4. Boolean
  5. Array
  6. Object
  7. NULL
  8. Resource

1. String:
String is a collection of characters within the double or single quotes like
“Computer Application” or ‘Computer Application’. Space is also considered as a character.
Example:
$x = “Computer Application!”;

2. Integer:
Integer is a data type which contains non decimal numbers.
Example:
$x = 59135;
*
The var_dump( ) system define function, returns structured information (type and value) about variables in PHP.

3. Float:
Float is a data type which contains decimal numbers.
Example:
$x = 19.15;

4. Boolean:
Boolean is a data type which denotes the possible two states, TRUE or FALSE
Example:
$x = true;
$y = false;

5. Array:
Array is a data type which has multiple values in single variable.
Example:
Scars = array(“Computer”,“Laptop”,“Mobile”);

OUTPUT:
array(3) {[0]=> string(5) “Computer” [1]=>
string(3) “Laptop “ [2]=> string(6)” Mobile”}
Var_dump:
The var_dump( ) function is used to dump information about a variable. This function displays structured information such as type and value of the given variable. Arrays and objects are explored recursively with values indented to show structure.

6. Object:
PHP object is a data type which contains information about data and function inside-the class.
<?php
class School {
function marks( ) {
$this->sec = “A”;
}
}
// create an object
$schoolobj = new School ( );
?>
OUTPUT
NULL

7. NULL:
Null is a special data type which contains a single,value: NULL
<?php $x = null;
?>
OUTPUT:
NULL

8. Resources:
Resource is a specific variable, it has a reference to an external resource. These variables hold specific handlers to handle files and database connections in respective PHP program.
<?php
// Open a file for reading
Shandle = fopen(“note.txt”, “r”);
var_dump($handle);
echo “<br>”;
// Connect to MySQL database server with
default setting
Slink = mysql_connect(“localhost”, “root”, “”);
var_dump($link);
?>

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 5.
Explain operators in PHP with example?
Answer:
Operators in PHP:
Operator is a symbol which is used to perform mathematical and logical operations in the programing languages. Different types of operator in PHP are:

  1. Arithmetic operators
  2. Assignment operators
  3. Comparison operators
  4. Increment/Decrement operators
  5. Logical operators, and
  6. String operators.

1. Arithmetic operators:
The arithmetic operators in PHP perform general arithmetical operations, such as addition, subtraction, multiplication and division etc.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 3

2. Assignment Operators:
Assignment operators are performed with numeric values to store a value to a variable. The default assignment operator is “=”. This operator sets the left side operant value of expression to right side variable.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 4

3. Comparison Operators:
Comparison operators perform an action to compare two values. These values may contain integer or string data types (Number or Strings).
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 5

4. Increment and Decrement Operators:
Increment and decrement operators are used to perform the task of increasing or decreasing variable’s value. This operator is mostly used during iterations in the program logics.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 6

5. Logical Operators:
Logical Operators are used to combine conditional statements.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 7

6. String Operators:
Two operators are used to perform string related operations such as Concatenation and Concatenation assignment (Appends).
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 8

Samacheer Kalvi 12th Computer Applications Solutions Introduction to Hypertext Pre-Processor Additional Questions and Answers

I. Choose The Best Answer

Question 1.
Tim Benner’s Lee developed
(i) Internet
(ii) www
(iii) Javascript
(iv) css
(a) only (i)
(b) (i) and (ii)
(c) (i), (ii), (iii)
(d) (ii), (iii), (iv)
Answer:
(b) (i) and (ii)

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 2.
……………………… Scripting languages was introduced to support Internet online business.
(a) Server
(b) Client
(c) Web
(d) Online
Answer:
(c) Web

Question 3.
Which one of the following is a fundamental part of any dynamic web page?
(a) HTML
(b) PHP
(c) CSS
(d) JS
Answer:
(b) PHP

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 4.
PHP was invented by
(a) Rasmus Lerdoof
(b) Tim Berner’s Lee
(c) Bob Frankston
(d) Don Bricklin
Answer:
(a) Rasmus Lerdoof

Question 5.
CSS means
(a) combined script style
(b) cascading style sheets
(c) calculated spreadsheet
(d) consecutive script sheets
Answer:
(b) cascading style sheets

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 6.
Pick the odd one out.
php, css, ASP, JSP
Answer:
CSS

Question 7.
ASP stands for
(a) All server pages
(b) All script pages
(c) Active server pages
(d) Active script pages
Answer:
(c) Active server pages

Question 8.
JSP means
(a) Joint Server photographs
(b) Java Server pages
(c) Java Script program
(d) Active script pages
Answer:
(b) Java Server pages

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 9.
ASP is developed by
(a) Apache
(b) Apple
(c) Microsoft
(d) Macromedia
Answer:
(c) Microsoft

Question 10.
In which year php was developed?
(a) 1991
(b) 1992
(c) 1993
(d) 1994
Answer:
(d) 1994

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 11.
Find the Incorrect statement:
(I) 78.9% of websites are developed by PHP Scripting Language.
(II) 2.2% of websites developed with Python.
Answer:
(II) 2.2% of websites developed with Python.

Question 12.
CGI stands for
(a) Common Gateway Interface
(b) Call Gateway Interrupt
(c) Cold Gateway Interface
(d) Client Gateway Interface
Answer:
(a) Common Gateway Interface

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 13.
IIS is
(a) Interrupt Interface Service
(b) Intra Interface Service
(c) Intra Interface Service
(d) Internet Intranet Service
Answer:
(b) Intra Interface Service

Question 14.
PHP, 7.3 is released on
(a) Dec 30 2017
(b) Nov 30 2017
(c) Oct 30 2017
(d) Jan 30 2018
Answer:
(b) Nov 30’ 2017

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 15.
Find the Correct one
(i) PHP is an open source
(ii) Apache tom cat supports PHP
(iii) MS-ITS Supports PHP
(a) Only (i) is true
(b) (ii), (iii) – True
(c) (i), (ii) – True
(d) (i), (ii), (iii) – True
Answer:
(d) (i), (ii), (iii) – True

Question 16.
The ……………………… is a high performance hardware machine it could run more than one application concurrently.
Answer:
Server

Question 17.
The ……………………… is a separate hardware machine which is connected with server in the networks.
Answer:
Client

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 18.
Match the following
1. Webservers – (a) ASP
2. Server Scripting Language – (b) Server
3. Service provider – (c) Microsoft IIS
4. Service requester – (d) Client
(a) 1 -(c) 2-(a) 3-(b) 4-(d)
(b) 1-(a)2 (b) 3-(c) 4-(d)
(c) 1-(d)2-(c)3-(b)4-(a)
(d) 1-(d) 2-(a) 2-(b) 4-(c)
Answer:
(a) 1 -(c) 2-(a) 3-(b) 4-(d)

Question 19.
How many client server architecture models there?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(b) 3

Question 20.
The ……………………… architecture is used for the server, accessed by client as two layer interactions.
Answer:
two tier

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 21.
Statement I: Multi/Three tier Architecture is used for the server, accessed by client through more than one layer Interaction.
Statement 2: The programmer could decide the count of business logic layers according to the software requirement.
(a) I – True, II – False
(b) I – False, II – True
(c) I, II – Both True
(d) I, II – Both False
Answer:
(c) I, II – Both True

Question 22.
……………………… is a software which is running in server hardware.
Answer:
webserver

Question 23.
Which takes the responsibilities for compilation and execution of server side scripting languages?
(a) Client
(b) HTML
(c) JS
(d) Web Server
Answer:
(d) Web Server

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 24.
How many clarifications of web scripting languages are there?
(a) 1
(b) 2
(c) 3
(d) 4
Answer:
(b) 2

Question 25.
OOP’S stands for ……………………………
Answer:
object oriented programming

Question 26.
How many percentage of websites are running under the open source web servers?
(a) 100%
(b) 70%
(c) 120%
(d) 130%
Answer:
(d) 130%

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 27.
What is the default port number taken by the software after installation?
(a) 100
(b) 110
(c) 120
(d) 130
Answer:
(d) 130

Question 28.
Name the configuration setting file which is used to run PHP scripting language?
(a) httpk.conf
(b) httpd.conf
(c) httpp.conf
(d) httpdd.conf
Answer:
(b) httpd.conf

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 29.
Under which directory httpd.conf file is located?
(a) configure
(b) config
(c) configuration
(d) conf
Answer:
(d) conf

Question 30.
How many types of PHP syntax are available?
(a) 1
(b) 2
(c) 3
(d) A
Answer:
(c) 3

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 31.
Pick the odd one out
Default syntax, Shortcut Tags, Short Open Tags, HTML Script embed Tags
Answer:
Shortcut Tags

Question 32.
For short open tags, the admin has to enable settings in ………………………… file?
(a) init
(b) php
(c) initialise
(d) php.ini
Answer:
(d) php.ini

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 33.
The short open tags begins with ………………………….. and closes with ……………………………
Answer:
<? and ?>

Question 34.
Find the correct statement.
1) The embedded PHP file gets executed by the web client.
2) The embedded PHP file get executed in the web server.
Answer:
2) The embedded PHP file get executed in the web server.

Question 35.
………………………….. are the storage locations which can store the values for the later manipulations in the program.
(a) typecast
(b) variables
(c) operand
(d) include
Answer:
(b) variables

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 36.
The variable in PHP begins with a …………………….. symbol.
(a) $
(b) #
(c) II
(d) =
Answer:
(a) $

Question 37.
The statements in PHP ends with
(a) $
(b) =
(c) ;
(d) :
Answer:
(c) ;

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 38.
Which one of the following statement is correct related to variable?
(a) data type is required
(b) data type is not required
Answer:
(b) data type is not required

Question 39.
Which is false?
(a) variable name can start with number
(b) variable name can never start with a number
Answer:
(a) variable name can start with number

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 40.
How many primitive data types are there in PHP scripting language?
(a) 10
(b) 11
(c) 12
(d) 13
Answer:

Question 41.
Identify the Incorrect statements
Case (I) variables are used to classify the data according to the logics Case
(II) Data types are used to classify the data according to the logics
Answer:
Case (I) variables are used to classify the data according to the logics Case

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 42.
Pick the odd one.
UNIQUE NULL OBJECT ARRAY
Answer:
UNIQUE

Question 43.
………………………. is a collection of characters within the double quotes or single quotes.
Answer:
String

Question 44.
Space is considered as a character.
(a) True
(b) False
Answer:
(a) True

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 45.
How many possible values does Boolean data type has?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(a) 2

Question 46.
Which datatype contains non-decimal numbers?
(a) Integer
(b) Float
(c) Boolean
(d) Octal
Answer:
(a) Integer

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 47.
Which function gives information about the given variable?
Ans
(a) var( )
(b) variable( )
(c) var-dump( )
(d) vardump( )
Answer:
(c) var-dump( )

Question 48.
………………………… is a data type which contains information about data and function inside the class.
Answer:
object

Question 49.
What is the keyword used to create a class?
(a) class
(b) classes
(c) class name
(d) class tag
Answer:
(a) class

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 50.
………………………… variables holds specific handlers to handle files and database connections
Answer:
Resource

Question 51.
………………………. is a symbol which is used to perform mathematical and logical operations.
Answer:
Operator

Question 52.
How many types of operators are there in PHP?
(a) 3
(b) 4
(c) 5
(d) 6
Answer:
(d) 6

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 53.
Pick the odd one out.
(a) && || ! !=
(b) == == !=
Answer:
(a) != (b)=

Question 54.
Which one of the following is the modulus operator?
(a) +
(b) %
(c) ||
(d) !
Answer:
(b) %

Question 55.
Which is the default assignment operator?
(a) =
(b) ==
(c) ===
(d) ====
Answer:
(a) =

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 56.
Pick the odd one out.
(a) +=
(b) *=
(c) >=
(d) %=
Answer:
(c) >=

Question 57.
Assignment operator set the …………………….. side operant value of expression to ……………………… side variable.
Answer:
left and right

Question 58.
Which operators compares two values?
(a) Arithmetic
(b) Increment
(c) Comparision
(d) Logical
Answer:
(c) Comparision

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 59.
Match the following
1. And – (i) &&
2. Or – (ii) ||
3. Not – (iii) !
4. Not equal – (iv) image
(a) 1-(i) 2-(ii) 3-(iii) 4-(iv)
(b) 1-(iv) 2-(iii) 3 -(ii) 4-(iii)
Answer:
(a) 1-(i) 2-(ii) 3-(iii) 4-(iv)

Question 60.
Identify the wrongly matched pair.
(a) Equal – ==
(b) Not Equal – ! =
(c) Not Identical – <>
(d) Identical – ===
Answer:
(c) Not Identical – <>

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 61.
Which operator is mostly used during iteration in the program logics.
(a) Increment
(b) Decrement
(c) both a & b
(d) none of these
Answer:
(c) both a & b

Question 62.
!$x is an example of …………………………… operator.
(a) And
(b) Or
(c) Not
(d) Xor
Answer:
(c) Not

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 63.
Which operator combines conditional statements.
(a) Comparision
(b) Relational
(c) Resource
(d) Logical
Answer:
(d) Logical

Question 64.
The string concatenation operator is ………………………….
(a) +
(b) .
(c) -=
(d) – =
Answer:
(b) .

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 65.
…………………………. Concatenation assignment operator.
Answer:
.. =

Question 66.
Concatenation assignment operator comes under
(a) Assignment
(b) String
(c) Character
(d) Logical
Answer:
(b) String

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 67.
Which operator appends are text to the another?
(а) Character
(b) Assignment
(c) Strings
(d) Logical
Answer:
(c) Strings

Question 68.
Find the statement which is wrong?
(a) PHP is a security program language
(b) PHP is a Flexibility program language
(c) PHP is a platform dependent program language
(d) PHP is a Real-Time Access Monitoring programming language
Answer:
(c) PHP is a platform dependent program language

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 69.
URL Stands for ………………………….
Answer:
Uniform Resource Locator

Question 70.
HTTP means ……………………….
Answer:
Hyper Text Transfer Protocol

II. Short Answers

Question 1.
Define Web browser?
Answer:
(i) Web Browser:
A Web browser (commonly referred to as a browser) is a software application for accessing information on the World Wide Web.

(ii) Each individual Web page, image, and video is identified by a distinct URL, enabling browsers to retrieve and display them on the user’s device.

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 2.
Name the three types of syntax available in PHP?
Ans
Three types of PHP Syntax are available. They are as follows:

  1. Default Syntax
  2. Short open Tags
  3. HTML Script embed Tags.

III. Explain in Brief Answer

Question 1.
Write note on HTTP?
Answer:
HTTP:

  1. HTTP HyperText Transfer Protocol.
  2. HTTP is the underlying protocol used by the World Wide Web.
  3. This protocol defines how messages are formatted and transmitted.
  4. The actions taken by web servers and browsers in response to various commands.

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 2.
Draw a diagram for client server Architecture model?
Answer:
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 9

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 3.
Explain short open tags?
Answer:
Short open Tags:
The Short open Tags begins with “<?” and closes with But admin user has to enable Short style tags settings in php.ini file on the server.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 10

Question 4.
Write note on var-dump function?
Answer:
Var_dump:

  1. The var_dump( ) function is used to dump information about a variable.
  2. This function displays structured information such as type and value of the given variable.
  3. Arrays and objects are explored recursively with values indented to show structure.

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 5.
Explain resources with examples?
Answer:
Resources
Resource is a specific variable, it has a reference to an external resource. These variables hold specific handlers to handle files and database connections in respective PHP program.
<?php
// Open a file for reading
Shandle = fopen(“note.txt”, “r”);
var_dump($handle);
echo “<br>”;
// Connect to MySQL database server with
default setting
Slink = mysql_connect(“localhost”, “root”, “”);
var_dump(Slink);
?>

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 6.
Write note on different types of Increment and decrement operators with example?
Increment and Decrement Operators:
Answer:
Increment and decrement operators are used to perform the task of increasing or decreasing variable’s value. This operator is mostly used during iterations in the program logics.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 11

IV. Explain in detail.

Question 1.
Explain different client server Architecture model?
Answer:
Client Server Architecture:
Model Client server architecture is classified into three types, as follows

  1. Single Tier Architecture
  2. Two Tier Architecture
  3. N/Multi/Three tire architecture

1. Single Tier Architecture:
This architecture is used for the server, accessed by client. The client application runs inside the server machine itself. This acts as a single layer interaction as shown in Figure.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 12

2. Two Tier Architecture:
This architecture is used for the server, accessed by client as two layer interactions. Such as Client layer in tire one and server layer in tire Two.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 13

3. Multi/Three Tier Architecture:
This architecture is used for the server, accessed by client through more than one layer interaction. The programmer could decide the count of business logic layers according to the software requirement that is the reason this model is also known as Multi Three Tire Architecture.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 14
Most of the server side scripting languages are working on any one the client server architecture model. Webserver is software which is running in server hardware. It takes the responsibilities for compilation and execution of server side scripting languages.

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 2.
Explain different types of PHP syntax?
Answer:
Three types of PHP Syntax are available. They are as follows

  1. Default Syntax
  2. Short open Tags
  3. HTML Script embed Tags

1. Default Syntax:
The default Syntax begins with “<?php” and closes with “?>”.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 15

2. Short open Tags:
The Short open Tags begins with “<?” and closes with “?>”. But admin user has to enable Short style tags settings in php.ini file on the server.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 16

3. HTML Script embed Tags:
HTML Script embed Tags looks just like HTML scripts tags. The syntax is shown in Figure.
Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to H - 17
The above syntax is created and saved in a file with extension of .php. This .php file is ready to execute from Webserver and generate response to client machine.

Samacheer Kalvi 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 3.
Explain important features of PHP?
Answer:

  1. PHP is an Open Source
  2. PHP is a Case Sensitive
  3. PHP is a Simplicity Program language
  4. PHP is a Efficiency Program language
  5. PHP is a Platform Independent Program language
  6. PHP is a Security Program language
  7. PHP is a Flexibility Program language
  8. PHP is a Real-Time Access Monitoring Program language