Tamil Solution

Educational News | Recruitment News | Tamil Articles

Padasalai Co 12th New Study Materials

Padasalai Co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Padasalai Co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

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

Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 3.
A PHP script should start with ……………………. and end with …………………….
(a)
(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)

Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

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

Padasalai.co 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”

Padasalai.co 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:

PHP can be used on all major operating systems.
PHP has also support for most of the web servers today. This includes Apache, IIS, and many others.
The main advantage of creating your own PHP GUI(Graphical User Interface)
PHP can interact with MySQL databases
PHP can perform all types of calculations and It can collect user information.
Question 2.
What is Webserver?
Answer:
Web server software is available as the 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.

Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 3.
What are the types of a scripting language?
Answer:
Web scripting languages are classified into two types,

Client-side scripting language
Server-side scripting language
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 the server in the network (Internet/intranet). It could send the request and receive the response from the server hardware. The Server and client are also called a service provider and service requester respectively.

Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 5.
Give few examples of Web Browser?
Answer:

Google Chrome v Mozilla Firefox
Opera
Safari
Internet Explorer
UC Browser
Netscape Navigator etc.
Question 6.
What is a 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, PHP is case sensitive in regards to function only but it should not include the function(s) which is defined by the user.

Padasalai.co 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 a semicolon The semicolon indicates the end of the statement.
$a=5; $b=T0;

Question 9.
Define Client-Server Architecture?
Answer:

Client-server architecture is a network architecture in which each computer or process on the network is either a client or a server.
Servers are powerful computers or processes dedicated to managing disk drives printers, or network traffic
Clients are PCs or workstations on which users run applications.
Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 10.
Define Webserver?
Answer:
Web server software is available as the 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 a server-side scripting language?
Answer:

The server is a high-performance hardware machine it could run more than one application concurrently.
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.
Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

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

A web server (or Web server) is server software or hardware dedicated to running said software, that can satisfy World Wide Web client requests.
A web server can, in general, contain one or more websites.
A web server processes incoming network requests over HTTP and several other related protocols.
Padasalai.co 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:

The server is a high-performance hardware machine. It could run more than one application concurrently.
The server is the service provider.
Ex. Php. Asp.net, Python, Cold Fusion
It is relatively secure
Client-Side Scripting Language:

The client is a separate hardware machine which is connected with a server in the network.
The client is the service requester
html, css, Javascript
Insecure
Padasalai.co 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:

There are two ways to use HTML on your PHP page.
The first way is to put the HTML outside of your PHP tags. You can even put it in the middle if you close arid reopen the tags.
The second way to use HTML with PHP is by using PRINT or ECHO. By using this method you can include the HTML inside of the PHP tags.
Question 5.
Write short notes on PHP operator?
Answer:
Operator is a symbol which is used to perform mathematical and logical operations in the programming languages. Different types of operator in PHP are:

Arithmetic operators
Assignment operators
Comparison operators
Increment/Decrement operators,
Logical operators, and
String operators.
PART – IV
IV. Explain in detail

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

PHP (Hypertext Pre-processor) is a one of the important server-side Web and general-purpose scripting language invented by Rasmus Lerdorf in 1994.
It is very simple and lightweight open-source server-side scripting language.
It can easily embed with HTML and other client-side scripting languages like CSS (Cascading Style Sheets) and Javascript.
It also creates dynamic and interactive Webpages in the real-time Web development projects
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 Javascript.
The PHP code entirely executes on Webserver which is installed in the remote machine and it is generating HTML code that is sent to the user.
The user receives the HTML code and sees the Website contents via an Internet browser in their computer or laptop.
PHP also supports OOPs (Object Oriented Programming) concepts. It is applicable to implement all OOPs features such as class, object and inheritance etc. The action is shown in Figure.
Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to H – 1

Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 2.
Discuss in detail Website development activities?
Answer:
Web development concept describes in detail Website development and hosting through the network (Internet/Intranet).
The process of development also includes

Web content generation
Web page designing
Website security and so on.
Website Development Life Cycle

  1. Information Gathering

Set goals for the website
Define website’s target audience

  1. Planning

Create a sitemap sketch
Create a wireframe/mockup
Select technology stack

  1. Design

Create colorful page layouts
Review the layouts
Get client’s feedback on the layouts
Change the layout when required

  1. Content writing and assembly

Create new content
Get content ready for migration

  1. Coding

Build and deploy a website
Add special features and website
Testing, Review and Launch

  1. Test the create website

Upload the website to server
Final test and launch

  1. Maintenance and Regular updating

Add report system
Fix bugs
Keep website up-to-day
Padasalai.co 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 bytecode that is then interpreted by the runtime engine.

Web server software is available as the open-source or licensed version in the market. Recent statistics of Web server usage depict that more than 130% of Websites are running under 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 the 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 the Windows Control panel. Once the services stops, the client machine will not receive the response message from the 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.

Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

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

String
Integer
Float
Boolean
Array
Object
NULL
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:
    The array is a data type which has multiple values in a 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.

  1. Object:
    PHP object is a data type which contains information about data and function inside-the class.
    sec = “A”;
    }
    }
    // create an object
    $schoolobj = new School ( );
    ?>
    OUTPUT
    NULL
  2. NULL:
    Null is a special data type which contains a single,value: NULL

    OUTPUT:
    NULL
  3. 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.
    ”;
    // Connect to MySQL database server with
    default setting
    Slink = mysql_connect(“localhost”, “root”, “”);
    var_dump($link);
    ?>

Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

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

Arithmetic operators
Assignment operators
Comparison operators
Increment/Decrement operators
Logical operators, and
String operators.

  1. Arithmetic operators:
    The arithmetic operators in PHP perform general arithmetical operations, such as addition, subtraction, multiplication and division etc.
    Padasalai.co 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 the expression to the right side variable.
    Padasalai.co 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 (Numbers or Strings).
    Padasalai.co 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 the variable’s value. This operator is mostly used during iterations in the program logics.
    Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to H – 6
  5. Logical Operators:
    Logical Operators are used to combining conditional statements.
    Padasalai.co 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).
    Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to H – 8

Padasalai.co 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)

Padasalai.co 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

Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

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.
CSS means
(a) combined script style
(b) cascading style sheets
(c) calculated spreadsheet
(d) consecutive script sheets
Answer:
(b) cascading style sheets

Padasalai.co 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

Padasalai.co 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

Padasalai.co 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

Padasalai.co 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

Padasalai.co 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 a server in the networks.
Answer:
Client

Padasalai.co 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

Padasalai.co 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

Padasalai.co 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%

Padasalai.co 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

Padasalai.co 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

Padasalai.co 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

Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

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

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

Padasalai.co 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) ;

Padasalai.co 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

Padasalai.co 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

Padasalai.co 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

Padasalai.co 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

Padasalai.co 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

Padasalai.co 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

Padasalai.co 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) =

Padasalai.co 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

Padasalai.co 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 – <>

Padasalai.co 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

Padasalai.co 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) .

Padasalai.co 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

Padasalai.co 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

Padasalai.co 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.

Padasalai.co 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:

Default Syntax
Short open Tags
HTML Script embed Tags.
III. Explain in Brief Answer

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

HTTP HyperText Transfer Protocol.
HTTP is the underlying protocol used by the World Wide Web.
This protocol defines how messages are formatted and transmitted.
The actions taken by web servers and browsers in response to various commands.
Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

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

Padasalai.co 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.
Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to H – 10

Question 4.
Write note on var-dump function?
Answer:
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.
Padasalai.co 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.
”;
// Connect to MySQL database server with
default setting
Slink = mysql_connect(“localhost”, “root”, “”);
var_dump(Slink);
?>

Padasalai.co 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.
Padasalai.co 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

Single Tier Architecture
Two Tier Architecture
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.
    Padasalai.co 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.
    Padasalai.co 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.
    Padasalai.co 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.

Padasalai.co 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

Default Syntax
Short open Tags
HTML Script embed Tags

  1. Default Syntax:
    The default Syntax begins with “”.
    Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to H – 15
  2. Short open Tags:
    The Short open Tags begins with “”. But admin user has to enable Short style tags settings in php.ini file on the server.
    Padasalai.co 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.
    Padasalai.co 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.

Padasalai.co 12th Computer Applications Solutions Chapter 4 Introduction to Hypertext Pre-Processor

Question 3.
Explain important features of PHP?
Answer:

PHP is an Open Source
PHP is a Case Sensitive
PHP is a Simplicity Program language
PHP is a Efficiency Program language
PHP is a Platform Independent Program language
PHP is a Security Program language
PHP is a Flexibility Program language
PHP is a Real-Time Access Monitoring Program language