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)
![]()
Question 2.
The assignment activity implemented using …………….. operator.
a) +
b) –
c) *
d) =
Answer:
d) =
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
![]()
Question 4.
PHP was invented by
(a) Rasmus Lerdorf
(b) Tim Berner’s Lee
(c) Bob Frankston
(d) Don Bricklin
Answer:
(a) Rasmus Lerdorf
Question 5.
PHP was invented by ………….
a) RasmusLerdorf
b) Dennis Ritchie
c) Bjarne Strousrup
d) James Goasling
Answer:
a) Rasmus Lerdorf
![]()
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.
Which of the following are the important server-side Web and general-purpose scripting languages?
a) HTML
b) CSS
c) Javascript
d) PHP
Answer:
d) PHP
![]()
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
![]()
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.
Which of the following is an identical operator?
a) =
b) = =
c) = = =
d) ! = =
Answer:
c) = = =
![]()
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
![]()
Question 15.
PHP, …………… is released by the official team on 30 November 2017.
a) 7.1
b) 7.2
c) 7.3
d) All of the above
Answer:
c) 7.3
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 a server in the networks.
Answer:
Client
![]()
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.
We can use …………to comment multiple lines?
a) /?
b) //
c) #
d ) /**/
Answer:
d ) /**/
Question 20.
The ……………………… architecture is used for the server, accessed by the client as two-layer interactions.
Answer:
two-tier
![]()
Question 21.
Statement I: Multi/Three-tier Architecture is used for the server, accessed by the client through more than one layer of 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
![]()
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 percentages of websites are running under the open-source web servers?
(a) 100%
(b) 70%
(c) 120%
(d) 130%
Answer:
(d) 130%
![]()
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
![]()
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
![]()
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 the………………………… file?
(a) init
(b) php
(c) initialise
(d) php.ini
Answer:
(d) php.ini
![]()
Question 33.
The short open tags begin with ………………………….. and close 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 gets executed in the webserver.
Answer:
2) The embedded PHP file gets executed in the webserver.
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
![]()
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) ;
![]()
Question 38.
Which one of the following statements is correct related to a variable?
(a) datatype is required
(b) the datatype is not required
Answer:
(b) the datatype is not required
Question 39.
Which is false?
(a) a variable name can start with number
(b) a variable name can never start with a number
Answer:
(a) a variable name can start with number
![]()
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
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
![]()
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
![]()
Question 45.
How many possible values does the Boolean data type have?
(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
![]()
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
![]()
Question 50.
………………………… variables hold 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
![]()
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) =
![]()
Question 56.
Pick the odd one out.
(a) +=
(b) *=
(c) >=
(d) %=
Answer:
(c) >=
Question 57.
Assignment operator set the …………………….. side operant value of the expression to ……………………… side variable.
Answer:
left and right
Question 58.
Which operators compare two values?
(a) Arithmetic
(b) Increment
(c) Comparision
(d) Logical
Answer:
(c) Comparision
![]()
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 – <>
![]()
Question 61.
Which operator is mostly used during iteration in the program logic.
(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
![]()
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) .
![]()
Question 65.
…………………………. Concatenation assignment operator.
Answer:
.. =
Question 66.
Concatenation assignment operator comes under
(a) Assignment
(b) String
(c) Character
(d) Logical
Answer:
(b) String
![]()
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
![]()
Question 69.
URL Stands for ………………………….
Answer:
Uniform Resource Locator
Question 70.
HTTP means ……………………….
Answer:
HyperText Transfer Protocol
II. Short Answers
Question 1.
What is the purpose of the Var__dump() function?
Answer:
- The var_dump() function is used to dump ‘ information about a variable.
- This function displays structured information such as the type and value of the given variable.
![]()
Question 2.
Name the three types of syntax available in PHP?
Ans
Three types of PHP Syntax are available. They are as follows:
- Default Syntax
- Short open Tags
- HTML Script embed Tags.
III. Explain in Brief Answer
Question 1.
Write the types of PHP Syntax.
Answer:
Three types of PHP Syntax are available.
They are as follows:
- Default Syntax
- Short open Tags
- HTML Script embed Tags
![]()
Question 2.
Draw a diagram for the client-server architecture model?
Answer:
![]()
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 the php.ini file on the server.
Question 4.
What is the main advantage of PHP variable declaration?
Answer:
The main advantage of the PHP variable declaration is, it does not require to specify the | data type keyword separately such as int, chap float, double or string, etc.
![]()
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);
?>
![]()
Question 6.
Write a note on different types of Increment and decrement operators with an example?
Answer:
Increment and Decrement Operators:
Increment and decrement operators are used to perform the task of increasing or decreasing the variable’s value. This operator is mostly used during iterations in the program logic.
IV. Explain in detail.
Question 1.
Explain different client-server Architecture models?
Answer:
Client-Server Architecture:
Model Client-server architecture is classified into three types, as follows:
- Single Tier Architecture
- Two-Tier Architecture
- N/Multi/Three tire architecture
1. Single Tier Architecture:
This architecture is used for the server, accessed by the client. The client application runs inside the server machine itself. This acts as a single layer interaction as shown in Figure.
2. Two-Tier Architecture:
This architecture is used for the server, accessed by the client as two-layer interactions. Such as the Client layer in tire one and server layer in tire Two.
3. Multi/Three Tier Architecture:
This architecture is used for the server, accessed by the client through more than one layer of 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.
Most of the server-side scripting languages are working on anyone the client-server architecture model. The webserver is software which is running in server hardware. It takes the responsibilities for the compilation and execution of server-side scripting languages.
![]()
Question 2.
Explain different types of PHP syntax?
Answer:
Three types of PHP Syntax are available. They are as follows
- Default Syntax
- Short open Tags
- HTML Script embed Tags
1. Default Syntax:
The default Syntax begins with “<?php” and closes with “?>”.
2. Short open Tags:
The Short open Tags begins with “<?” and closes with “?>”. But admin user has to enable Short style tags settings in the php.ini file on the server.
3. HTML Script embed Tags:
HTML Script embed Tags look just like HTML script tags. The syntax is shown in Figure.
The above syntax is created and saved in a file with an extension of .php. This .php file is ready to execute from Webserver and generate a response to the client machine.
![]()
Question 3.
Write the Characteristics of PHP.
Answer:
- Open Source
- Case Sensitive
- Simplicity Program language
- Efficiency Program language
- Platform Independent Program language
- Security Program language
- Flexibility Program language
- Real-Time Access Monitoring Program language
