Plus Two Computer Science Chapter Wise Previous Questions Chapter 12 ICT and Society

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 12 ICT and Society.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 12 ICT and Society

Question 1
a) Name a digital financial instrument. [MARCH -2016] (1)
b) Discuss about various IPRs with examples for each. (3)
Answer:
a) Credit card or Debit card or ATM machine or Swipe machine
b) Refer Sectionl2.2.1 Intellectual Property Right.

Question 2
Givethegoal of Computer forensics. [May-2016] (1)
Answer:
Critical evidence of a particular crime is available in electronic format with the help of computer foren¬sics. It helps to identify the criminal.

Question 3.
Explain different categories of cybercrimes against the government. [May-2016] (3)
Answer:
Just like normal crimes( theft, trespassing private area, destroy, etc,) Cyber crimes(Virus, Trojan Horse, Phishing, Denial of Service, Pornography etc) also increased significantly . Due to cyber crime, the victims lose money, reputation,etc and some ofthem commit suicide.

A) Cyber crimes against individuals
i) Identity theft: The various information such as personal details(name, Date of Birth, Address, Phone number etc.), Credit / Debit Card details(Card number, PIN, Expiry Date, CW, etc), Bank details, etc. are the identity of a person. Stealing these information by acting as the authorized person without the permission of a person is called Identity theft. The misuse of this information is a punishable offence.

ii) Harassment : Commenting badly about a particular person’s gender, colour, race, religion, nationality, in Social Media is considered as harassment. This is done with the help of Internet is called Cyber stalking (Nuisance). This is a kind of torturing and it may lead to spoil friend ship, career, self image and confidence. Sometimes may lead to a big tragedy of a whole family or a group of persons.

iii) Impersonation and cheating : Fake accounts are created in Social Medias and act as the original one for the purpose of cheating or misleading others. Eg: F.ake accounts in Social Medias (Facebook, Twitter,etc), fake sms, fake emails etc.

iv) Violation of privacy : Trespassing into another person’s life and try to spoil the life. It is a punishable offence. Hidden camera is used to capture the video or picture and black mailing them.

v) Dissemination of obscene material: With the help of hidden camera capture unwanted video or picture. Distribute or publish this obscene clips on Internet without the consent of the victims may mislead the people specifically the younger ones.

B) Cyber crimes against property
Stealing credit card details, hacking passwords of social media accounts or mail account or Net banking, uploading latest movies etc, are considered as cyber crimes against property.

i) Credit card fraud : Stealing the details such as credit card number, company name, expiry date, cw number,password etc. and use these details to make payment for purchasing goods ortransfer funds also.

ii) Intellectual property theft: The violation of Intellectual Property Right of Copy right, Trademark, Patent etc. In film industry crores of investment is needed to create a movie. Intellectual Property thieves upload the movies on the Releasing day itself. Hence the revenue from the theatres are less significantly and undergoes huge loss.(Eg: Premam, Bahubali, etc) Copying a person’s creation and present as a new creation is called plagiarism. This can be identified some tools(programs) available in the Internet.

iii) Internet time theft : This is deals with the misuse of WiFi Internet facility. If it is not protected by good password there is a chance of misuse our devices(Modem/Router) to access Internet without our consent by unauthorized persons. Hence our money and volume of data(Package) will lose and we may face the consequences if others make any crimes.

C) Cyber crimes against government
The cyber crimes against Govt, websites is increased significantly. For example in 2015 the website of Registration Department of Kerala is hacked and destroys data from 2012 onwards.

i) Cyber terrorism : It is deals with the attacks against very sensitive computer networks like computer controlled atomic energy power plants, air traffic controls, Gas line controls, telecom, Metro rail controls, Satellites etc. This is a very serious matter and may lead to huge loss (money and life of citizens). So Govt, is very conscious and give tight security mechanism for their services.

ii) Website defacement : It means spoil or hacking websites and posting bad comments about the Govt.

iii) Attacks against e-governance websites : Its main target is a Web server. Due to this attack the Web server/ computer forced to restart and this results refusal of service to the genuine users. If we want to access a website first you have to type the web site address in the URL and press Enter key, the browser requests that page from the web server. Dos attacks send huge number of requests to the web server until it collapses due to the load and stops functioning.

Question 4.
a) An Educational channel of Kerala Government is [MARCH -2017] (1)
b) Discuss about the schemes used in protecting intellectual property. (3)
Answer:
a) VICTERS.
b) Intellectual property is divided into two categories
1) Industrial Property
2) Copy right

1) Industrial property
It ensures the protection of industrial inventions, designs, Agricultural products etc from unauthorized copying or creation or use. In India this is done by Controller of Patents Designs and Trademarks.

• Patents
A person or organization invented a product or a creation can be protected from unauthorized copying or creation without the permission of the creator by law. This right is called Patent. In India the validity of the right is up to 20 years. After this anybody can use freely.

• Trademark
This is a unique, simple and memorable – sign to promote a brand and hence increase the business and goodwill of a company, it must be registered. The period of registration is for 10 years and can be renewed. The registered trademark under Controller General of Patents Design and Trademarks cannot use or copy by anybody else.

• Industrial designs:
A product or article is designed so beautifully to attract the customers. This type of designs is called industrial design. This is a prototype and used as a model for large scale production.

• Geographical indications
Some products are well known by the place of its origin. Kozhikkodan Halwa, Marayoor Sharkkara(Jaggery), Thirupathi Ladoo, etc are the examples.

2) Copyright
The trade mark is ©, copy right is the property right that arises automatically when a person creates a new work by his own and by Law it Prevents the others from the unauthorized or intentional copying of this without the permission of the creator for 60 years after the death of the author.

AttributesPatentTrademarkCopyright
ItemsProduct, ProcessName, Logo, SignsCreativity, artistic
Registration RequiredYesYesNo(Automatic)
Duration20 years10 yearsUpto60 years after the death ofthe author
RenewableNoYesNA

Plus Two Computer Science Chapter Wise Previous Questions Chapter 11 Advances in Computing

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 11 Advances in Computing.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 11 Advances in Computing

Question 1.
a) The computing technology in which a problem is broken into pieces and solved concurrently is called …………….. [March -2016] (1)
b) Categorize the cloud service models. (3)
Answer:
a) Parallel or Distributed computing
b) Refer 5 Mark, Question 1

Question 2.
Give any three advantages and disadvantages of grid computing. [May – 2016] (3)
Answer:
Refer 3 Mark, Question 11

Question 3.
a) A widely used operating system for cluster computers is ………….. [March -2017] (1)
b) Discuss advantages of grid computing, cluster computing and cloud computing. (3)
Answer:
a) Any OS
b) 1) Grid computing advantages

  • It is used to solve more complex problems in a short time
  • Existing hardware used efficiently
  • Scalable : The number of computers can be added according to the work load increases.

2) Cluster computing Advantages

  • Price-performance ratio: The performance is high and the cost is less.
  • Availability : If one group of system fails the other group will do the work. Scalability: Computers can be easily added according to the work load increases.

3) Cloud computing
Advantages

  • Cost savings : Companies can reduce costs by using cloud computing
  • scalability/ Flexibility: More resources are used when the work load increases.
  • Reliability : It is reliable and helps in disaster recovery
  • Maintenance : The service provider do the system maintenance, then reducing maintenance requirements.
  • Mobile accessible : Employees can do their job even when they are in move.

Plus Two Computer Science Chapter Wise Assess Questions and Answers

Question 1.
Explain the features of distributed computing.
Answer:
Distributed computing is a method of computing in which large problems can be divided into smaller ones and these smaller ones are distributed among several computers. The solution for the smaller ones are computed separately and simultaneously. Finally the results are assembled to get the desired overall solution.

Advantages:

  • Economical: Reduces the computing cost hence it is economical
  • Speed : The work load of the entire system is less hence the speed is high.
  • Reliability : When one computer in the network fails the entire work will not be blocked, i.e. the other computers will do the work properly.
  • Scalability : We can add computers according to the work load.

Question 2.
Compare parallel and serial computing.
Answer:
The difference between these two is given below,

Serial computingParallel computing
A single processor is usedMultiple processors are used with shared memory
A problem is divided into a series of instructionsA problem is divided into smaller ones that can be solved simultaneously
Instructions executed sequentiallyInstructions executed simultaneously
One instruction is executed on a single processor at any momentMore than one instruction is executed on multiple processors at any moment of time.

Question 3.
The distributed paradigm that uses existing hardware is ___________
Answer:
effectively

Question 4.
List advantages of cluster computing.
Answer:
The advantages of cluster computing is given below.

  • Price-performance ratio: The performance is high and the cost is less.
  • Availability: If one group of system fails the other group will do the work.
  • Scalability : Computers can be easily added according to the work load increases.

Question 5.
Explain how cloud service model change the way we use computers.
Answer:
It is an emerging computing technology. Here with the use of Internet and central remote servers to maintain data and applications. Example forthis is Email service, Office Software(word processor, spread sheets, presentations, data base etc), graphic software etc. The information is placed in a central remote server just like clouds in the sky hence the name cloud computing.

Cloud service models (3 major services)
1) Software as a Service (SaaS): A SaaS provider company provides more services on demand such as they allow to access both resources and applications.

Examples are Google Docs, Adobe creative cloud, Microsoft Office 365, Facebook.com etc.

2) Platform as a Service(PaaS): A PaaS provider company provides subscribers access to the components that they, require to develop and operate applications over the Internet.

Example : LAMP platform(Linux,Apache Server,MySQL and PHP), ASP.NET, PHP and Python, Google’s App Engine, Microsoft Azure, Force.com, etc.

3) Infrastructure as a Service(laaS): It provides basic storage devices and computing capabilities as standardized services over the network.

Example: Amazon Web Services, Joyent, AT&T, GoGrid etc.

Question 6.
Give example for companies that offer SaaS.
Answer:
A SaaS provider company provides more services on demand such as they allow to access both resources and applications. Examples are Google Docs, Adobe creative cloud, Microsoft Office 365, Facebook.com etc.

Question 7.
List the advantages and limitations of cloud computing.
Answer:
Advantages

  • Cost savings : Companies can reduce costs by using cloud computing
  • Scalability/ Flexibility: More resources are used when the work load increases.
  • Reliability : It is reliable and helps in disaster recovery
  • Maintenance: The service provider do the system maintenance, then reducing maintenance requirements.
  • Mobile accessible : Employees can do their job even when they are in move.

Disadvantages:

  • Security and privacy Security measurements must be applied otherwise the data will be misused
  • Lack of standards : Clouds have no standards so it is not possible to export or import programs.

Question 8.
Draw and explain the knowledge pyramid.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 11 Advances in Computing 1
Answer:
Data is termed as a collection of mere symbols. While processing data we get information and knowledge is the organized information. It can be a piece of information that helps in decision making. The ability to draw useful inferences from the available knowledge is generally referred as intelligence. Wisdom is the maturity of the mind that directs its intelligence to achieve desirable goals.

Question 9.
What is Computational Intelligence?
Answer:
Earlier machines were used to do our work. But with the invention of digital computers, we use computers to solve time-consuming and complex tasks faced in real life. The main goal is to make the interaction of machines is more and man less. The study of man and machine interactions and control methods are known as Cybernetics.

Question 10.
Define Cybernetics?
Answer:
The study of man and machine interactions and control methods are known as Cybernetics.

Question 11.
The test used tõ to decide whether a machine is intelligent or not ¡s called _________.
Answer:
Turing test.

Question 12
What is ANN?
Answer:
Artificial Neural Networks(ANN) : The brain is a complex, nonlinear and parallel computer with ability to perform tasks such as recognise pattern, perception and motor control.ANN is the method of simulate biological neural systems to learn, memorise and generalize like human beings. A human brain cortex consists of 10-500 billion neurons with 60 trillion synâpses(a synapse is a stwcture that permits a neuron to pass an electrical)

Question 13
Explain Swarm Intelligence
Answer:
Swarm Intelligence is the study of behaviour of colonies or groups of social animals, birds, insects. ants etc. How they communicate and create and manage their own colonies beautifully.

Question 14.
Explain Fuzzy Systems
Answer:
Human beings use common sense while facing a problem, just like human beings fuzzy systems can also use common sense and behave like a human beings. Fuzzy systems ¡s used to control gear transmission and raking systems, control lifts, home appliances, controlling traffic signals etc.

Question 15.
List some uses of biometrics.
Answer:
Biometrics are used in the attendance management system, authentication in computers and other devices, Aadhar cards, etc.

Question 16.
Write the uses of robotics.
Answer:
Robotics are used in all the areas. Some of them are discussed below.

  1. Uses in vehicle manufacturing industry : Robots are used to do all tasks such as welding, cutting, lifting, sorting and bending. Since it is a machine, it can operate for long hours untiringly.
  2. Exploration of outer space : Robots are very much useful in this field such as they are used to do all the tasks related to launch a satellite.
  3. In intelligent homes : Robots are used in home segments to safe guard the home, automatically open the gate, doors and windows, etc.
  4. Exploration in difficult environments : Human beings are not ready to work in situations like too hot and too cold. Since it is a machine robots are used instead of human beings. Robots are used in oil filed etc.
  5. Uses in military : Unmanned air crafts and vehicles are controlled by robots. Drones and computer-controlled cameras are used in Military service.
  6. Uses in agriculture : Nowadays in India the agriculture field is also in mechanization trend. Hence increase the productivity.

Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 10 Server Side Scripting Using PHP.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 10 Server Side Scripting Using PHP

Question 1.
PHP is [March – 2016]
(a) freeware
(b) proletary
(c) both
(d) none (1)
Answer:
(a) freeware

Question 2
a) Compare Indexed and associative arrays in PHP. [March – 2016] (2)
b) Write a PHP program to display prime numbers below 50. (3)
OR
Write a PHP program to display the perfect numbers below 100. (3)
Answer:
a) In PHP array is a collection of key and value pairs. Unlike C++, in PHP we can use either non-negative integers or strings as keys.

Different types of arrays in PHP

  • Indexed arrays
  • Associate arrays
  • Multi dimensional arrays.

Indexed arrays-: The elements in an array can be distinguished as first or second or third etc. by the indices and the index of the first element is zero. In PHP the function array() is used to create an array.
Syntax: $array_name=array(valuel ,value2 );
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 47
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 48
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 49

Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 1
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 2

Question 3.
An array in PHP is given as follows: [May – 2016]
Sfamily = array (“Father”=>”Ajay”, “Son”=>”Arjun”, “Daughter”=>” “Archana”);
Name the type of this array. Write a for each loop that prints all the array elements. (2)
Answer:
This array is called associative array <? PHP
$family = array (“Father” = > “Ajay”, “Son” => “Arjun”, “Daughter” = > “Archana”);
foreach($family as $key =>$name) echo “$key – $name”. “, “;
?>

Question 4
A web server that supports PHP on any operating system is _____________ . [May – 2016] (1)
Answer:
Apache / LAMP/ WAMP

Question 5.
Discuss about special data types used in PHP. [May – 2016] (2)
Answer:
Special data types

  • Null: Special data type with value NULL. This is the default value to a variable, if we do not set a value to it.
    $m=null;
  • Array: Array is a collection of elements. With the same name we can store many elements.
    Three types of array –

    • Indexed array:
    • Associated array:
    • Multidimensional array:
  • Object: Similar in C++ and must be declared explicitly. At first a class is declared and then objects can be created using the command ‘new’.
  • Resources: It is not an actual data type rather it is a special variable that hold references to file handler, data base object, etc.

Question 6.
Create an HTML form in PHP showing the difference of the GET and POST method. [May – 2016]
OR
Write a function in PHP to find the factorial of a (3)
Answer:
The difference between GET and POST method is given below.

Get method Post method
1) Faster 1) Slower
2) Tosendsmallvolume of data. 2) To send large volume of data
3) Up to 2000 characters 3) No limit
4) Less secure 4) More secure
5) Data visible during submission 5) Data not visible during submission
6) Page link can be book marked 6) Page link can never be book marked.

OR
Step 1
Take a note pad and type the following and save it as fact_form.html in C:\Abyss Web Server\htdocs
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 3

Step2
Take another notepad and type the following and save it as fact.php in C:\Abyss Web Server\htdocs
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 4

Step 3
Open Internet Explorer and type the following in the address bar
http://localhost/fact_form.html.

Plus Two Computer Science Chapter Wise Practice Questions and Answers

Question 1.
Write a PHP program to display the multiplication table of 5.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 5

Question 2.
Write a PHP program to display all palindrome numbers between 100 and 200.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 6

Question 3.
Write a PHP program to display all Armstrong numbers below 1000.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 7

Question 4.
Display the following table using PHP and HTML. Each cell should display the row number and column number of the cell. You are supposed to use the PHP loop statement to generate the table.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 8
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 9
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 10

Question 5.
Write a program to find the biggest of three numbers.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 11
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 12

Question 6.
Create a registration form which contains the fields Name, Roll No, General and a submit button. Write a PHP script which accepts these details and display it back on the browser when the user clicks the submit button.
Answer:
Step 1
Take a notepad and type the following
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 13

Step 2
Take another notepad and type the following
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 14
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 15

Step 3.
Run the first file.

Question 7.
Write a PHP script for the following. Design a form to accept a string. Write a function to count the total number of vowels (a, e, i, o, u) from the string.
Answer:
Step 1
Take a notepad and type the following
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 16

Step 2
Take another notepad and type the following
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 17
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 18
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 19

Question 8.
Create a table in MySQL and insert a few records. Write a PHP script script to display the inserted records on a browser.
Answer:
Step 1
Take MySQL and create a table as follows
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 20

Step 2
Take a notepad and type the following and run.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 21
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 22
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 23
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 24

Question 9.
Create a table in MySQL and insert a few records. Write a PHP script to accept a value using a form, search the value in the database and display the record on a browser.
Answer:
Step 1.
Take a notepad and type the following. Save it as practiceQ9.html.

<html>
<head>
<title>
form
</title>
</head>
<body bgcolor=”cyan”>
<form method - ’post” action=”practiceQ9.php”>
Enter the Item code:
<input type=”text” name=”itemcode”><br>
<inputtype=’’submit” value=”submit”>
</form>
</body>
</html>

Step 2.
Take another notepad and type the following and save it as practiceQ9.php.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 26
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 27
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 28

Step 3.
Run the file practice9.html
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 29
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 30

Plus Two Computer Science Chapter Wise Assess Questions and Answers

Question 1
Which of the following functions returns 1 when the output is successful?
a) echo ()
b) print ()
c) both
d) None
Answer:
b) print()

Question 2.
Which of the following printing constructs accepts multiple parameters?
a) echo
b) print
c) printf
d) All of the above
Answer:
a) echo

Question 3
Which one of the following should not be used while sending password or other sensitive information?
a) Get
b) Post
c) Request
d) Next
Answer:
a) Get

Question 4
Which of the following functions returns the number of characters in a string variable?
a) count($variable)
b) ien($variable)
c) strcount($variable)
d) strlen(Svariable)
Answer:
d) strlen($variable)

Question 5
Which of the following variables is not a predefined variable?
a) $GET
b) $ASK
c) SREQUEST
d) $POST
Answer:
b) $ASK

Question 6
When $_GET variable is used to collect data, the data is visible to
a) none
b) only you
c) everyone
d) selected few
Answer:
c) everyone.

Question 7
When $_POST variable is used to collect data, the data is visible to
a) none
b) only you
c) everyone
d) selected few
Answer:
a) none

Question 8
Which variable is used to collect form data sent with both the GET and POST methods?
a) %Both
b) $_Both
c) $Request
d) $_Request
Answer:
d) $_Request

Question 9.
Which one of the following parameters is not used mysql_connect()?
a) database host
b) user ID
c) password
d) database name
Answer:
d) database name

Question 10
Study the following steps and determine the correct order
i) Open a connection to MySQL server
ii) Execute the SQL, query
iii) Fetch the data from query
iv) Select database
v) Close Connections
a) 1, 4, 2, 3, 5
b) 4, 1, 2, 3, 5
c) 1, 5, 4, 2, 1
d) 4, 1, 3, 2, 5
Answer:
a) 1, 4, 2, 3, 5.

Question 11.
What is PHP?
Answer:
Sip Formerly it is known as Personal Home Pages. Nowadays PHP stands for PHP Hypertext Preprocessor. Normally, it runs on a web server.

Question 12.
What is the difference between PHP and JavaScript?
Answer:
Client-side scripts(JavaScript) are run faster but it has some limitations. The limitations are we can view the source code hence it is less secure. On the other hand PHP is executed on the server and the result is sent back to the client(browser) so it is impossible to view the source code.

Benefits of using PHP
Client-side scripts(JavaScript) are run faster but it has some limitations. The limitations are we can view the source code hence it is less secure. On the other hand PHP is executed on the server and the result is sent back to the client(browser) so it is impossible to view the source code.

Benefits of PHP are given below

  • As PHP can be easily embedded into HTML moreover its easiness to convert a static website into a dynamic one.
  • It is compatible with almost all databases
  • It is platform-independent can run on almost all OS (Windows, Linux, MAC)
  • It is simple and easy to learn
  • It uses very small amount of system resources to run and faster.
  • PHP provides security to prevent malicious attacks.
  • Open-source community supports PHP
  • It is a free s/w by all means hence can be used to develop all types of web sites.

Question 13.
What are the steps involved in running a PHP?
Answer:
Take a note pad and type the code, PHP code should begin with <?php and end with ?>. Save this file in the root directory of the web server with extension php.

Step 1
Take a notepad and type the following and save it as first.php on C:\Abyss Web Server\htdocs.
<?php
echo”My first PHP web page”;
?>

Step 2
Start the web server if it is off

Step 3
Type as “http://localhost/first.php” in the address bar.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 31

Question 14
What is the use of “echo” in PHP?
Answer:
echo is an output statement, echo is used to produce multiple outputs. Parenthesis is optional.
eg:
echo “ first output”, “second output”;
or
echo (“ first output”, “second output”);

Question 15
What is the use of ‘print’ in PHP?
Answer:
print is an output statement, print is used to produce single outputs. It tales only one parameter and it is slower. It Returns TRUE or 1 on successful print and FALSE otherwise:
print “only one output”;
or
print (“only one output”);

Question 16.
What are the differences between “echo” and “print” statements?
Answer:
The difference between echo and print

echoprint
take more than one parameteronly one parameter
Does not return any valueReturns TRUE or 1 on successful print and FALSE otherwise
Fasterslower

Question 17.
Why is PHP superior to client-side languages such as JavaScript?
Answer:
Benefits of using PHP
Client-side scripts(JavaScript) are run faster but it has some limitations. The limitations are we can view the source code hence it is less secure. On the other hand PHP is executed on the server and the result is sent back to the client (browser) so it is impossible to view the source code.

Benefits of PHP are given below

  • As PHP can be easily embedded into HTML moreover its easiness to convert a static website into dynamic one.
  • It is compatible with almost all databases
  • It is platform-independent can run on almost all OS (Windows, Linux, MAC)
  • It is simple and easy to learn
  • It uses very small amount of system resources to run and faster.
  • PHP provides security to prevent malicious attacks.
  • Open-source community supports PHP
  • It is a free s/w by all means hence can be used to develop all types of web sites.

Question 18.
Which character is used to terminate a PHP statement? Name one situation where omitting this termination character does not produce an error.
Answer:
In PHP each and every statement must be end with semicolon. There is an exception for the last statement. For the last statement of PHP code semicolon is not compulsory.

Question 19.
What is an escape sequence? Name three commonly used escape sequences.
Answer:
Escape sequences
It is a character preceded by a back slash(\)

OperatorDefinitionExampleOutput
\”To print “echo TPHPY”’“PHP”
\’To print ‘echo”XYian”X’ian
\nNew lineecho “BVM \nHSS”BVM HSS
\tTo print tabecho”BVM\tHSS”BVM HSS
\rPrint carriage return
\$To print Secho “100\$”100$
\\To print\echo’’\\n is used as new line”\n is used as new line

Question 20.
What will be the output of the following PHP scripts?
a) <?php
echo “Today looks \nbright and sunny”;
?>

b) <?php
echo “ours not to question why;”;
echo “ours but to do and die”;
?>

c) <?php
$x = 8 ;
$y = 8 ;
echo (sx = = sy) ;
?>
Answer:
a) Today looks bright and sunny
b)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 32
C) 1

Question 21.
Find the error in each of the following PHP scripts:
a) <?php
/* print a line of output /
echo ‘hello’
?>

b) <?php
echo ‘<p align=”right”>Copyright Me, 2008</p>’;
?>

c) <?php
echo‘Line 1;
?>
Answer:
a) There is an error
Un terminated comment line The correct code is as follows
<?php
/‘print a line of output*/
echo’hello’
?>

b) no error.
c) String must be enclosed in single or double quotes. The correct code is as follows.
<?php
echo’Line 1‘;
?>

Question 22.
Which are the different types of loops in PHP?
Answer:
Loops in PHP

a) while loop
It is an entry controlled loop The syntax is given below
Loop variable initialised

while(expression)
{
Body of the loop;
Update loop variable;
}

Here the loop variable must be initialised out side the while loop. Then the expression is evaluated, if it is true then only the body of the loop will be executed and the loop variable must be updated inside the body. The body of the loop will be executed until the expression becomes false.

<?php
$i=10;
while($i>0)
{
echo”$i\t”;
$i - ;
}
?>

b) do-while loop
This loop will execute at least once. The body of the loop will be executed until the expression becomes false,

do
{
Body of the loop;
Update loop variable;
}while(expression);
Eg.
<?php
$i=10;
do
{
echo”$i\t”;
Si- -;
}while(Si>0);
?>

c) for loop
The syntax of for loop is given below For(initialisation; testing; updation)

{
Body of the for loop;
}
Eg.
<!DOCTYPE HTML>
<html lang=”en”>
<head>
<title>
We are learning PHP
</title>
</head>
<body bgcolor=”cyan”>
<?php
for($i=10;$i>0;$i- -)
echo”$i\t”;
?>
</body>
</html>

d) foreach loops(Extension of for loop)
The number of elements in an array is not known in advance foreach loop is used.

Two types
a) for ($array_variable_name as $value)
No need to specify the starting index and ending index, the array pointer is moved one by one.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 35

b) foreach($array_variable_name as key=>$value) Here the value of the current array element is assigned to $value and the key is assigned to $key.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 36

Question 23
How do we declare an array in php?
Answer:
Arrays in PHP
In PHP array is a collection of key and value pairs. Unlike C++, in PHP we can use either non-negative integers or strings as keys.

Different types of arrays in PHP

  • Indexed arrays
  • Associate arrays
  • Multi dimensional arrays.

Indexed arrays: The elements in an array can be distinguished as first or second or third etc. by the indices and the index of the first element is zero. In PHP the function array() is used to create an array.

Syntax: $array_name=array(value1 ,value2,……….);
OR
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 37

2 Associative arrays
Arräys with named keys and string indices are called associative arrays.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 38
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 39

Question 24
What is the importance of “action” attribute in an HTML, form?
Answer:
The action attribute in an HTML form specifies the file name the data to be submitted. When the submit button in the form is clicked the data is submitted to the file specified in the action attribute.

Question 25
How can we extract the string “hotmail.com” from a string “[email protected]”?
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 40
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 41

Question 26.
What will be the output of the folloiwng code?
$a = 10;
if($a> 5cr< 15)
echo ‘true’;
else
echo ‘false’;
Answer:
An error occurred the correct code and output is as follows

<?php
$a=10;
if($a>5or$a<15)
echo 'true’;
else
echo’false’;
?>
The out put is true.

Question 27.
What will be the output of the following code? (1)

function fn ($var)
{
$var = $var - ($var/10*5);
return $var;
}
echo fn (100);

Answer:
The output is 50.

Question 28.
How do super global arrays help programming in PHP?
Answer:
This is a special variable available to all programs.

SuperglobalPurpose
GLOBALSGlobal scope variables available.
$_SERVERInformation about the server
$_GETData passed using the HTTP GET method
$_POSTData passed using the HTTP POST method
$_REQUESTData passed via HTTP request
$_FILESData passed by an HTML file input
S_SESSIONCurrent session data specific to the user
S_COOKIEData stored on the browser.

Question 29
What is the use of $ SERVER?
Answer:
PHP $_SERVER
This returns the paths and script locations.

CodeDescription
$_SERVER [‘PHP_SELF’]Returns the currently executing file name
$_SERVER [‘SERVER_NAME’]Returns the host server name
$ SERVER [‘SCRIPT_NAME’]same as $_SERVER[‘PHP_SELF]

Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 42
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 43
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 44

Question 30
What are the difference between GET and POST methods in form submitting? (5)
Answer:
The difference between GET and POST method is given below.

Get methodPost method
1. Faster1. Slower
2. To send small volume of data.2 To send large volume of data
3. Up to 2000 characters3. No limit
4. Less secure4. More secure
5. Data visible during submission5. Data not visible during submission
6. Page link can be book marked6. Page link can never be book marked.

Question 31
While submitting a form, the URL displayed on the address barwas http://localhost:8080 check2.php? exam=March2014&web=www.dhsekerala.gov.in Can you identify which method was used here?
Answer:
The method used was GET method because it displayed all the data during data submission.

Question 32
While trying to open a dynamic webpage from a . bookmark saved earlier, the webpage did not show properly. What could be the reason for this?
Answer:
The reason for this is that the method used for data submission is POST method. It is invisible to others that is the variables are not displayed in the URL hence it is not possible to bookmark the page.

Question 33
How do we create a MySQL connection?
Answer:
Establishing connection to MySQL database To access data from the data base, the PHP program first establish a connection to the data base server(MySQL) and then specify the data base to use.

Consider the following
1) Open a connection to MySQL.
2) Secify the data base we want to open.
3) Retrieve data from or insert data in to dat base.
4) Close the connection.

Question 34
How do we select a MySQL database from PHP?
Answer:
MySQL server may contain many data bases. mysqi_select_db() is a function used to select pa, ocular data base. It return true if it finds the data base otherwise false.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 45
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 46

Question 35
How do we execute an SQL query? How to fetch its result?
Answer:
Two steps
a) Execute the SQL query on the data base using the function mysql_query()
Syntax:
$result_set=mysql7_query(query, connection);
b) I nsert a row using the function mysql_fetch_array()
$result_set=mysql_query(query, connection);
$fetched_row=mysql_fetch_array($result_set);

Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 9 Structured Query Language.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 9 Structured Query Language

Question 1.
The keyword is used in a SELECT statement to avoid duplicate rows. [March – 2008] (1)
Answer:
Distinct

Question 2.
The columns used in a table are called ……………………….. [March – 2008] (1)
Answer:
Attributes

Question 3.
Manju wants to create a table for a new inventory application. The table contains the details of products in a shop. The details are item code, description, stock quantity, reorder level. Write SQL commands to create this table with necessary constraints. [March – 2008] (3)
a) Itencode should not be empty for any row and it must be primary key.
b) Description should have some value.
c) The reorder level should be at least 10.
Answer:
Create table inventory item code mt not null primary key, despite char(30) not null.ock_qty mt, rol mt);

Question 4.
Name any two aggregate functions. [March – 2008] (1)
Answer:
SUM().AVG()

Question 5.
A village hospital has maintained a database for pa-tients with fields IPNO primary key varchar(10), Patient Name varchar(20), Age number(3), Roomno number(3) Write SQL queries to do the following: [February – 2008] (5)
a) Modify the table by adding field Doctor name not null
b) Update Doctor name field with a value ‘LINDA’ for a particular record with IPNO=30
c) Display all patients group by Doctors name.
d) Display all patients in the age group 20 to 30 years age
e) Display details of all patients whose name start with ‘An’
Answer:
a) Alter table patient add(Doctorname char(20) not null);
b) Update patient set Doctorname= ‘LINDA’where IPNO=30;
c) Select ‘from patient group by Doctorname;
d) Select * from patient where age between 20 and 30;
e) Select * from patient where PatientName like ‘An%’;

Question 6.
Duplication of data is called __________ [February – 2008] (1)
Answer:
Data Redundancy

Question 7.
Explain aggregate functions. [February – 2008] (3)
OR
Write any four Aggregate functions in SQL and its use.
Answer:
1) Sum() – To find the total of column name specified as the argument.
2) Avg()- To find the average of column name speci-fied as the argument.
3) Min() – To find the smallest value of column name specified as the argument.
4) Max() – To find the largest value of column name specified as the argument.
5) Count()- To find the number of values in the col-umn specified as the Argument.

Question 8.
Which command is used to remove a table from a database? [February – 2008] (1)
Answer:
DROP TABLE <table name>

Question 9.
View can be used just like a table. Then what is the purpose of creating view? [February – 2008] (2)
Answer:
A view is a virtual table. That means it really does not exist. We can create a view based upon a table. If we create a view all users cannot see the entire data base.

It gives high security.

Question 10.
Ceena wants to delete the records or all commerce Students having marks less than 35 from the table named Student. Write the SQL command for this. Name, Reg No,subject and marks are the fields of the table. [March – 2009] (2)
Answer:
Delete from Student where Subject-Commerce’ and Marks<35.

Question 11.
Which key word can be used with SELECT command to avoid duplication of rows in the selection? [March – 2009] (1)
Answer:
Distinct

Question 12.
A company wants to create a table to store the stock details. Write SQL commands for the following. [June – 2009] (5)
1) Create a table with name stock and fields item code, name, qty, and unit price.
2) Insert 2 records into the table.
3) Display the items in the ascending order of name.
4) List all the items where qty is less than 10
5) List all items with a price greater than 100.
The name field is char type and the others are numeric.
Answer:
1) Create table stock(itemcode decimal(4), name char(25),qty decimal(4),pricedecimal(8,2));
2) insert into stock values (101, ‘Pears’, 1000,48);
3) select name from stock order by name;
4) select name from stock where qty < 10;
5) select name from stock where price < 100;

Question 13.
What are the features of Data manipulation language which makes it attractive? [June – 2009] (2)
Answer:
DML related to the instance of the database provides commands for inserting rows into the table, deleting rows from the table. It also facilitates the modification of the Contents of the tables and it allows the retrieval of information from the database. The DML commands are inserted, update, delete, and select.

Question 14.
Prabha created a table in SQL with 10 records. Which DML command is used to change the values in a column of specified rows? Write the format also. [June – 2009] (2)
Answer:
The update is the DML command used to change the values in a column of specified rows. The keyword set is used and the clause where is also used to change the specified row. The syntax is given below: Update <table name> set <column name> = value where <condition>;

Ex: update Student set age =17 where rollno = 1;

Question 15.
Write a query on the CUSTOMER table whose output will exclude all customers with a RATING <=100, unless they are located in Kochi. [February – 2009] (2)
Answer:
Select * from CUSTOMER where RATING <=100 and Place= ‘Kochi’

Question 16.
A table BANK consists of fields A/c. No, Customer Name, age,Type of deposits (Savings, Current, Fixed), Deposited Amount.

Write SQL statements to [March – 2010] (5)
a) Display A/c. No. and Customer Name whose age is greater than 60.
b) Display A/c.No. and Customer Name of those who having Savings A/c.
c) Display the Customer Names which starting with the alphabet A.
d) Display the A/c. No. and Customers Names of those who deposited above 1 lakh rupees as Fixed Deposit.
e) To include a new field Address.
Answer:
a) Select Acc No, Name from Bankwhere age>=60;
b) Select accno, name from Bank where type_of_deposits=’savings’;
c) Select name from Bank where name like‘A%’;
d) Select accno, name from Bank where type_of_deposits=‘savings’and amount>100000;
e) Alter table Bank add (Address char(30))

Question 17.
Find the odd one out. [March – 2010] (1)
(a)Oracle
(b) SQLServer
(c) DDL
(d) MySql
Answer:
DDL

Question 18
Can you find any alternate keys in the following table? Justify your answer. [March – 2010] (2)

Reg_noRoll_noYearName
112001Ramya
222001Resmi
332001Sheeba
412002Sona
522002Soumya

Answer:
The candidate key that is not the primary key is called the alternate key. Here the candidate keys are Reg.No, Roll No.+year, Roll No. + name. If we set Reg.No. as the primary key then the other keys are alternate keys.

Question 19.
A table Student consists of fields Rollno, Name, Batch and Mark. [June – 2010]
Write SQL statements to
a) Display Rollno and Name of Students where mark is less than 90 and greater than 70.
b) Display Rollno and Name of all Students in science batch whose mark is more than 90.
c) Display Names of all Students in Commerce and Humanities batches.
d) Display the Rollno and Name in the ascending order of batch and descending order of Mark.
e) Display the number of Students in each batch. (5)
Answer:
a) Select RollNo.Name from Student where Mark<90 and Mark > 70;
b) Select RollNo.Name from Student where . Batch-Science’ and Mark > 90;
c) Select Name from Student where Batch- Com-merce’ OrBatch=’Humanities‘;
d) Select RollNo.Name from Student order by Batch, Mark desc;
e) Select Batch,Count(Mark) from Student group by Batch;

Question 20.
Write the essential clause required for each of the following SQL command. [June – 2010]
a) Insert Into
b) Select
c) Update
Answer:
a) Insert Into – Values
b) Select – From
c) Update – Set

Question 21
Write the syntax of Create Table Command. [June – 2010] (2)
Answer:
Create table <table name>(<column name> <datatype> [(size)] [<column constraints-],<column names <datatype> [(size)] [<column constraints>],);

Question 22.
Consider the following table Student: [March -2011] (3)

Name Sex Course Per
Sandeep M Science 85
Martin M Commerce 70
Shiji F Commerce 75

a) Write a query to display names and percent of all mate Students in the Science branch.
b) Write an UPDATE command to set the Course attribute with ‘Humanities’ whose NAME is “Shiji”.
Answer:
a) select Name, Per from Student where Sex=’M’ and Course=’Science’;
b) Update Student set Course=’Humanities’ where Name-Shiji’;

Question 23.
The SQL Data Manipulation Language (DML) includes a Query language based on relational algebra. [March -2011] (3)
a) Give any four commands used in DML.
b) Write an SQL statement to INSERT values to the fields (adm_no, name, course, percent) with values (101, “Anoop”, “Science”, 75) for the table STUD.
Answer:
a) Insert, delete, select and update
b) insert into STUD values(101,’Anoop’,’Science’,75);

Question 24.
Tina wants to create a t^ble named mark with the fields name, regno, mark 1, mark 2 and total. Write the SQL commands to create the table with regno as primary key. [March – 2012] (3)
Answer:
Create table mark(name char(20), regno decimal(4) not null primary key,mark1 decimal(3), mark2 decimal^), total decimal(3));

Question 25
While naming a table in SQL, Reena typed ‘Select’ as thetable name. Isthere any mistake? Give reason. [March – 2012] (3)
Answer:
Yes, The Key words (Reserved words) or commands cannot used to name a table. Select is a keyword.

Question 26.
Give the correct syntax of the queries in SQL for the following: [March – 2016]
a) Renaming a table
b) Deleting rows from a tble .
C) Changing definition of a column
d) Removing columns from a table
e) Addinganewcolumn (5)
Answer:
a) Alter table <table name>
Rename to <New table name>

b) Delete from <table name>
[where <condition>];

c) Alter table <table name>
modify <column name>cdata type>
[<size>] [<constraint>];

d) Altertable <table narne>drop <column name>;

e) Altertable<table name> add <column name>
<data type> [<size>] [<constraint>];

Question 27.
Give the output obtained with the pattern match ‘i—”In the string board. [March – 2016] (1)
Answer:
“_ _ _” matches any string of exactly 3 characters without any space in between them, Hence “board” will not select.

Question 28.
What happens when we use DELETE FROM command without AWHERE clause? [May – 2016] (1)
Answer:
All the tu pies (rows/records) are deleted from the table.

Question 29.
Ifa table named mark” has field’s regNo. subcode and marks write SQL statements for the following: [May – 2016]
a) List the subject codes eliminating duplicates.
b) List the marks obtained by Students with subject codes 3001 and 3002.
c) Arrange the table based on marks for each source
d) List all the Students who have obtained marks above 90 for the subject codes 3001 and 3002.
e) List the contents of the table in the descending order of marks. (5)
Answer:
a) Select distinct subcode from mark;
b) Select marks from mark where subCode= 3001 orsubCode = 3002;
c) Select * from mark order by subcode, marks;
d) Select * from mark where subcode in (3001,3002) and marks >90;
e) Select *from mark order by marks desc;

Question 30
Distinguish between DDL and DML and give examples for each type. [May – 2016] (5)
Answer:
Data Definition Language(DDL) – It is used to define the structure of a table.

Data Definition Language is used to specify the definitions of Database Schema. The result of the compilation of DDL statements is a set of tables stored in a special file called data dictionary.

DDL Commands are Create table, Alter table and Drop table.

Data Manipulation Language(DML) – It is used to add, retrieve, modify and delete records in a database.lt is a language that enable users to access or manipulate data in the database. It also provides interfaces with programming languages.

DML Commands are select, insert, update and delete

Question 31.
Null values in tables are specified as “null”. State whether true or false. [May – 2016] (1)
Answer:
False. (without double quotes i.e. null is then it is true.)

Question 32.
Which command is used to delete the table? [May – 2017]
a) delete from
b) drop table
c) deletetable
d) dropview (1)
Answer:
b) drop table

Question 33.
Differentiate between CHAR and VARCHAR data types in SQL. [May – 2017] (3)
Answer:
Char – It is used to store fixed number of characters. It is declared as char(size).

Varchar – It is used to store-characters but it uses only enough memory.

It is declared as varchar(size).

Question 34.
Name the most appropriate SQL data type required to store the following data: [May – 2017]
a) Name of a Student (maximum 70 characters)
b) Date of Birth of a Student
c) Percentage of marks obtained (correct to 2 decimal places) (3)
Answer:
a) varchar
b) date
c) decimal

Question 35.
As part of your school project you are asked to create a relation Student.contains the details of 10 Students with the fields Roll No., Name, Date of Birth and Score in IT. The constraints required are – Roll No. is the primary key, name cannot be empty and score in IT should be less than 60. Based on this table Student answerthe following queries in relational algebra.
a) Display the details of Students whose-score is greater than 50.
b) Display the name of Students whose score lies between 45 and or equal to 60. [May – 2017] (5)
Answer:
Student

Roll NoNameDate Of BirthIT Score
1Raju15.04.200355
2Leo25.03.200343
3Geo15.05.200344
4Alvis15.02.200356
5Adeline15.10.200254
6Ann25.01.200334
7Andrea11.04.200357
8Jose17.04.200334
9Christy13.03.200343
10George22.04.200340

a) σIT_Score > 50 (Student)

Roll NoNameDate Of BirthIT Score
1Raju15.04.200355
4Alvis15.02.200356
5Adeline15.10.200254
7Andrea11.04.200357

b) π Name (σ IT_Score > 45 and IT_Score<=60 (Student))

Name
Raju
Alvis
Adeline
Andrea

Plus Two Computer Science Chapter Wise Practice Questions and Answers

Question 1.
The structure of a table is given to store the details of marks scored by Students in an examination. (5 Mark)

DataTypeDescription
Register numberNumericA unique and essential data to identify a student
NameStringA maximum of 30 characters
CourseStringIt can be Science, Commerce or Humanities
Marks of six subjectsNumeric eachSix separate columns are required

Write SQL statements for the creation of the table and the following requirements:
a) Insert data into the fields (at least 10 records).
b) Display the details of all Students.
c) List the details of Science group Students.
d) Count the number of Students in each course.
e) Add a new column named Total to store the total marks.
Fill the column Total with the sum of the six marks of each Student.
g) Display the highest total in each group.
h) Find the highest, lowest and average score in Subject 6 in Commerce group.
i) Display the names in the alphabetical order in each course.
j) Display the name of the Student with the highest total.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 1

a)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 2

b)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 3
c) mysql>seljept * from Student where course=’Science’;
d) mysql> select course,count(*) from -> Studentl group by course;
e) mysql>altertable Studentl add(total int);
f) mysql>update Studentl set total=mark1+ . mark2+mark3+mark4+mark5+mark6;
g) mysql>select course,max(total) from Studentl group by course;
h) mysql>selectmax(mark6),min(mark6), avg(mark6) from Studentl;
i) mysql>select course,name from Studentl order by course,name;
j) mysql>select name from Studentl where total=(selectmax(total) from Studentl);

Question 2.
The structure Qf a table is given to store the details of items in a computer shop. (5 Mark)

DataTypeDescription
Item numberNumericA unique and essential data to identify an item
Item nameStringA maximum of 30 characters
Date of purchaseDateDuplication is allowed
Unit priceFractionalPrice of a single item
QuantityNumericNumber of items
ManufacturerStringName of the supplier (can duplicate)

Write SQL statements for the creation of the table and the following requirements.
a) Insert data into the fields (at least 10 records).
b) Display the details of all items in the table.
c) Display the names of items and total price of each.
d) List the items manufactured by a company (specify the name) available in the table,
e) Find the number of items from each manufacturer.
f) Display the details of items with the highest price.
g) List the names of items whose price is more than the average price of all the items. ‘
h) Display the names of items purchased after 1 -1 -2015.
i) Get the details of items manufactured by two or three companies (specify the names) available in the table.
j) Display the details of items from a company (specify the name) with a stock of more than 20 pieces.
Answer:
mysql>create table shop (ItemNo int primary key, name char(30) not null,
DOP date,
UnitPricefloat(8,2),
Qty int,
mfrer char(30));

a) mysq!>insert into shop values(1,’Keyboard’, ‘2014-08-21 ’,300.00,100,’Tech Com’); mysql>insert into shop values(2,’Mouse’, ‘2014-08-21’,300.00,100,’Tech Com’); mysql>insert into shop values(3,’Speaker’,’2015- 08-21’,550.00,100,’I Ball’); mysql>insert into shop values(4,’CPU’,’2015-07- 21’,3500.00,100,’AMD’); mysql>insert into shop values(5,’RAM’, ‘2015-08-1 ’,1300.00,100,’Hynix’);
b) mysql>select * from shop;
c) mysql>select name, UnitPrice*Qty from shop;
d) mysql>select name from shop where mfrer=’Tech Com’;
e) mysql>select mfrer,count(*) from shop group by mfrer;
1) mysql>select * from shop where UnitPrice = (select max(UnitPrice) from shop);
g) mysql>select name from shop where UnitPrice > (select avg(UnitPrioe) from shop);
h) mysql> select* from shop where DOP>’2015-1-1 ’;
i) mysql> select name from shop where mfrer=’l Ball’and Qty>20;

Question 3.
The structure of a table is given to store the details of higher secondary school teachers. (5 Mark)

DataTypeDescription
Teacher IDNumericA unique and essential data to identify a teacher
NameStringA maximum of 30 characters
GenderCharacterMale or Female
Date of joiningDateDuplication is allowed
DepartmentStringScience, Commerce, Humanities or Language
Basic payNumericBasic salary of a teacher

Write SQL statements for the creation of the table and the following requirements:
a) Insert data into the fields (at least 10 records).
b) Display the details of all female teachers in the table.
c) List the details of male teachers in the Science department.
d) Display the names and basic pay of teachers in the Language department whose basic pay is Rs. 21000/-or more.
e) Display the names and 71 % of basic pay of the teachers.
f) Find the numbe of teachers in each department.
g) Display the details of teachers whose basic pay is less than the average basic pay.
h) List the male teachers who joined before 1-1-2010.
i) Increment the basic pay of all teachers by Rs. 1000/-.
j) Delete the details of teachers from the Language department.
Answer:
mysql>create table hsst (Teache rld in primary key, name varchar(30) not null,
gender char,
DOJ date,
Dept varchar(15),
BP float(8,2));
a) mysql>insert into hsst values(1,’Jose’,’M’,‘2002-01-01 ‘,‘Science’,25660);
mysql> insert into hsst values(2’Christy’,’F’,‘2012-01-01 ‘,‘Commerce’,20740);
mysql>insert into hsst values(3,’Geejo George’,’M’, ‘2007-01-01 ‘,‘Humani’ties’,22360);

b) mysql>select * from hsst where gender=’F’;

c) mysql>select * from hsst where gender=’M’ and
Dept= Science’;

d) mysql>select name, BP from hsst where
dept=’Language’ and BP >21 000;

e) mysql>select name, BP*.71 from hsst;
f) mysql>select Dept,count(*) from hsst group by Dept;
g) mysql>select * from hsst where BP < (select avg(BP) from hsst);
h) mysql>select * from hsst where gender=’M’ and DOJ<2010-01-01’;
i) mysql>update hsst set BP=BP+1000;
j) mysql>delete from hsst where Dept=’Language’;

Question 4.
The structure of a table s given to store the details of customers in a bank. (5 Mark)

DataTypeDescription
Account numberNumericA unique and essential, data to identify a customer
NameStringA maximum of 30 characters
GenderCharacterMale or Female
Date of joiningDateDuplication is allowed
Type of accountStringSB or Current
Balance amountNumericCan be a.fraetional number

Write SQL statements for the creation of the table and the following requirements:
a) insert data into the fields (at least lo records).
b) Display the details of customers having SB ac count.
c) Display the names of customers with a balance among greater than Rs. 5000/-.
d) Display the details of female customers with a balance amount greater than Rs. 10000/-
e) Cpunt the number of male and female customers.
f) Display the names of customers with the highest balance amount.
g) Display the names of customers whose names end with ‘kumar.
h) Update the balance amount of a particular cus tornerwith a deposit amount of Rs. 2000/-.
i) Display the details of customers with a tax deduction of 2% of the balance amount for those wtio have Rs. 2,00,000/- ¡n their account.
j) Delete the details of customers with current acco un
Answer:
mysql>create table customer
AccNo mt primary key,
name varchar(30),
gender char,
DOJ date,
TypeOfAcc char(8),
Balance double(10,2));

a) mysql>inserl ¡ nb customer values
(1001 ,‘Adeline’,’F’,’2008-11-26’’SB’,50000.O0);

mysql>insert into customer values
(1 002,’Aivis’ ‘M’, ‘2007-05-19 ‘Current50O000.00);
mysql>insert ¡rito customer values
(1003, ‘Andrea’,’F’, 2012-07-29’, ‘SB’450000.00);

b) mysql>select from customer where TypeofAcc=’SB’;
c) mysql>select name from customer where Balance>5000;
d) mysql>select name from customer where gender=’F’ and Balance>1 0000;
e) mysql>select gender,count(*) from customer group by gender;

mysql>select name from customer where Balance=(select max(Balance) from customer);
g) mysqi> select name from customer where name like “%kumar”;
h) mysql’update customer set Balance= Balance+ 2000whereAccno=1001;
i) mysql>select Accno,name, Balance*.02 from customer where Balance>=200000;
j) mysql > delete from customer where Type OtAcc = ‘Current’;

Plus Two Computer Science Chapter Wise Assess Questions and Answers

Question 1.
The command to remove rows from a table ‘CUSTOMER’ is: (1 Mark)
a) Remove From Customer
b) Drop Table Customer
c) Delete From Customer
d) Update Customer
Answer:
c) Delete From Customer

Question 2.
If values for some columns are unknown, how is a row inserted? (2 Mark)
Answer:
In this occasion the column list must be included, following the table name.
Eg. INSERT INTO <TABLE NAME> (COLUMN NAME1, COLUMN NAME2, ….) VALUES (VALUE1, VALUE2,… .);

Question 3.
Distinguish between CHAR and VARCHAR data types of SQL. (2 Mark)
Answer:
Char- It is used to store fixed number of characters. It is declared as char(size).
Varchar – It is used to store characters but it uses only enough memory.
It is declared as varchar(size).

Question 4.
What is the difference between PRIMARY KEY and UNIQUE constraints? (2 Mark)
Answer:
Unique – It ensures that no two rows have the same value in a column.
Primary key – Similar to unique but it can be used only once in a table.

The strings
(i) and
(iv) only

Question 5.
What do you mean by NULL value in SQL? (1 Mark)
Answer:
Null is a key word in SQL that represents an empty * value.

Question 6.
Which of the following is the correct order of clauses for the SELECT statements? (1 Mark)
a) Select, From, Where, Order By
b) Select, From, Order By, Where
c) Select, Where, From, Order By
d) Select, Where, Order By, From
Answer:
a. Select From, Where, Order By

Question 7.
The SQL operator …………….. is used with pattern matching. (1 Mark)
Answer:
Like Operator

Question 8.
Read the following strings : (1 Mark)
i) ‘Sree Kumar’
ii) ‘Kumaran’
iii) ‘Kumar Shanu’
iv) ‘Sreekumar’
Choose the correct option that matches with the pattern ‘%Kumar’, when used with LIKE operator in a SELECT statement.
a) Strings (i) and (ii) only
b) Strings (i), (iii) and (iv) only
c) Strings (i) and (iii) only
d) All the strings
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 4

Question 9.
List any five built-in functions of SQL arid the value- returned by each. (2 Mark)
Answer:
Aggregate functions
1. Sum()- find the total of column.
2. Avg() – find the average of a column.
3. Min()- find the smallest value of a column.
4. Max() – find the largest value of the column.
5. Count() -find the number of values in a column.

Question 10.
Distinguish between WHERE clause and HAVING clause. (2 Mark)
Answer:
Where clause is used to specify the condition.
Syntax: Select * from Student where roll=1;
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 5

Having clause is used with Group By to give conditions and to ofrm groups of records, not individual rows.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 6

Question 11.
Write any four DML commands in SQL. (2 Mark)
Answer:
The four DML commands are
1) Insert
2) Update
3) Select
4) Delete

Question 12.
Write the essential clause required for each of the following SQL command. (2 Mark)
a) Insert Into
b) Select
c) Update
Answer:
a) Insert Into – Values
b) Select – From
c) Update – Set

Question 13.
Consider the given table Cùstomer and write the out put of the following SQL queries: (5 Mark)

Acc.NoNameBranchAmount
1001KumarCalicut10000
1002SalimTrivandrum20000
1003FidaKottayam18000
1004JohnKannur30000
1005RajuThrissur5000

a) SELECT * FROM customer WHERE
Amount>25000:

b) SELECT Name FROM customer
WHERE Branch IN (‘Calicut, ‘Kannur’);

c) SELECT COUNT (*) FROM customer WHERE
Amount < 20000;

d) SELECT Name FROM customer WHERE Name like %m%;
e) SELECT * FROM customer ORDER BY Amount DESC;
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 7
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 8

Question 14.
Distinguish between COUNT (*) and COUNT (column-name). (2 Mark)
Answer:
Count() – find the number of non null values in a column.
Cou nt(*) This is used to find the number of records with at least one field.

Question 15.
Consider the given table ITEMS. (5 Mark)

Item CodeNameCategory PriceUnit PriceSales
0001PencilStationery5.008.00
0002PenStationery8.0010.00
0003NoteBookStationery10.0020.00
0004ChappalFootwear50.0070.00
0005AppleFruits60.0090.00
0006OrangeFruits40.0060.00
0007PenStationery10.0012.00

a) Suggest a suitable primary key for the above table. Give justification.
b) write SQL statements for the following:
i) To list all stationery items.
ii) To list itern code. name and profit of all items.
iii) To count the number of items in each category.
iv) To list all stationery items in the descending order of their unit price.
v) To find the item with the highest selliñg price.
vi) To, create a view that contains the details of all stationery items.
Answer:
a) Item code is the primary key for the table

b) (i)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 9

(ii)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 10

(iii)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 11

(iv)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 12

(v)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 13

(vi)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 14

Question 16.
What are the different modifications that can be made on the structure of a table? Which is the SQL corn mand required for this? Specify the clauses needs for each type of modification. (3 Mark)
Answer:
Alter table command is used to modify existing column or add new column to an existing table. There are 2 keywords used ADD and MODIFY.

We can alter the table in two ways.

We can add a new column to the existing table using the following syntax,

ALTER TABLE <tabiename>ADD(<cloumnname> <type> <constraint>);

We can also cha rige or modify the existing column in terms of type or size using the following syntax,
ALTER TABLE<tablename>MODIFY(<column> <newtype>);

Question 17.
A table is created in SQL with 10 records. Which SQL command is used to change the values in a column of specified ¿ows? Write the format. (2 Mark)
Answer:
UPDATE command s used for this.
Syntax : UPDATE <table name> set <column name>=value where condition.

Question 18.
Name the keyword used with SELECT command to avoid duplication of values in a column. (1 Mark)
Answer:
DISTINCT

Question 19.
Distinguish between DISTINCT and UNIQUE in SQL. (2 Mark)
Answer:
DISTINCT – This keyword is used to avoid duplicate values in a column of a table.
Unique – It ensures that no two rows have the same value in a column.

Question 20.
Pick the odd one out and give reason: (1 Mark)
a) CREATE
b) SELECT
c) UPDATE
d) INSERT
Answer:
a) CREATE, It is a DDL command the others are DML commands

Plus Two Computer Science Chapter Wise Previous Questions Chapter 8 Database Management System

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 8 Database Management System.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 8 Database Management System

Question 1.
Components of DBMS [MARCH – 2008] (3)
Answer:
a) databases – database is an organized collection of information.
b) Data Definition Language(DDL) – Data Definition Language is used to specify the definitions of Da-tabase Schema. The result of compilation of DDL statements is a set of tables stored in a special file called data dictionary.
c) Data Manipulation Language(DML) – It is a language that enable users to access or manipulate data in the database. It also provides interfaces with programming languages.
d) Users – users interact with DBMS indirectly via ; application programs or directly via simple query language.

Question 2.
What are the advantages of DBMS? [MARCH – 2008] (5)
OR
Consider there is a strike against the introduction of computer in your firm. How can you convince the ben-efits of computerization to the employees by pointing out the benefits of database over manual system?
Answer:
1) Data Redundancy .Duplication of data is known as redundancy, i.e., the same data may be repeated in many files. It leads to higher storage and access cost. So data redundancy should be eliminated.

2) Inconsistency can be avoided: If data redundancy exist, it may lead to data inconsistency. If redun-dancy is removed then inconsistency can be avoided.

3) Data can be shared: If the computers are connected to a network, the data stored in the database can be shared among several users or programs.

4) Standards can be enforced: There is a standard BIS (Bureau of Indian Standards) in the field of Gold and ISBN (International Standard Book Number) in the field of publication. Similarly here is also some standards like ANSI(American National Standards Institute), ISO (International Organization for standardization), etc.. For example a filed “Name” should have 40 characters is a standard.

5) Security restrictions can be applied: The database is of great value to a company or Organization. Data security means protection of data against accidental or intentional disclosure or unauthorized destruction or modification by un-authorized persons.

6) Integrity can be maintained: It ensures that the data entered in the database is correct. The data may contain incorrect information for example a date of birth can be 30/30/2001. To avoid this DBMS defines integrity check.

7) Efficient data access: It stored huge amount of data efficiently and can be retrieved whenever a need arise.

8) Crash recovery: Sometimes all ora portion of the data is lost when a system crashes. A good DBMS helpsto recover data afterthe system crashed.

Question 3.
The repetition of same data in a file system is known as ……….. . [MARCH – 2009]
Answer:
Data Redundancy

Question 4.
What is a Cartesian product? [MARCH – 2009]
Answer:
Cartesian product returns a relation consisting of all possible combinations of the tuple from two relations. Which is a binary operation. It is denoted by X. It is also called Cross Product.

Question 5.
Explain the different levels of data independence. [MARCH – 2009] (2)
Answer:
Data independence is the ability to modify the schema definition in one level without affecting the schema definition at the next higher level. There are two levels Of data independence, Physical data independence and. Logical data independence.

Question 6.
Name the different data models available for database systems. Which of them is the most preferred one? Briefly explain with a suitable example. [FEBRUARY – 2009] (S)
Answer:
There are three models:-
a) Hierarchical Model:
It assigns records to different levels of hierarchy. A lower level record is called the child and the higher level is called the parent. Data redundancy is the disadvantage of this model.

b) Network Model : It is similar to hierarchical model, but each child record can have more than one parent record. This model eliminates the re-dundancy encountered in the hierarchy model, but it has a high degree of complexity. It was introduced by CODASYL-DBTG in 1971.

c) Relational Model : It is based on the concept introduced by E F Godd. It composed of one or more tables. Here tables are called relations, rows are called tuples and the columns are called at-tributes. It has no data redundancy and complex-ity. So this is the best model.

Question 7.
Explain two unary operations in RDBMS using an example. [FEBRUARY – 2009] (3)
Answer:
1) Select: It is used to select tuples in a relation that satisfy a selection condition. To denote selection the lowercase Greek letters are used. The condition appears as a subscript to a. The relation is given in the parenthesis.
Eg:
To select the tuples whose salary > 5000 from Employee relation Employee)

2) Project: It selects certain columns from the table and discardsthe other columns. It is denoted by the Greek letter n.
Eg:
To select name and salary from the relation Employee.
nna™,salary (Employee)

Question 8.
Select a terminology which is not a part of DBMS. [JUNE – 2009] (1)
a) Relation b) Function c) Domain d) Tuple
Answer:
Function

Question 9.
Explain the different levels of data abstraction. [JUNE – 2009] (3)
Answer:
1) Physical Level is the lowest level. It describes how the data is actually stored in the storage medium. At physical level complex low-level data structures are described in detail.

2) Logical level describes what data are stored in the database and what relationships exist among data. Here database is described in terms of simple structures. Records are defined in this level. Programmers work at this level.

3) View level is the highest level of data abstraction. It is concerned with the way in which the users view the database. It describes only part of the database.

Question 10.
What are the components of DBMS? Explain. [JUNE – 2009] (3)
Answer:
a) databases – database is an organized collection of information.
b) Data Definition Language(DDL) – Data Definition Language is used to specify the definitions of Da-tabase Schema. The result of compilation of DDL statements is a set of tables stored in a special file called data dictionary.
c) Data Manipulation Language(DML) – It is a lan-guage that enable users to access or manipulate data in the database. It also provides interfaces with programming languages.
d) Users – users interact with DBMS indirectly via application programs or directly via simple query language.

Question 11.
Explain the structure of a file. [JUNE – 2009] (2)
Answer:
The structure of a file
Field: A field is the smallest unit of data. Ex: roll number, name.

Record : The collection of related fields is called a record. Ex: The information about a student File: A file is a collection of related records. Ex: The students details of a class.

Question 12.
__________ is the smallest unit of data. [JUNE – 2009] (1)
a) Record
b) file
c) key
d) field
Answer:
d. Field

Question 13.
Consider the database of Online Ticket reservation. Explain the classification of the users of this database. [MARCH – 2010] (3)
Answer:

AB
Database Administratorb) Person who has a central con­trol over definition and DBMS.
Application Programerc) Computer professionals who in­teract with the DBMS through Application programs
Usersa) Not concerned with or even aware of details of the DBMS.

Question 14.
There is an attribute Roll number in the table STUDENT. This attribute is also the candidate key in the table EXAM. So the Roll number is considered as key in the table EXAM. [MARCH – 2010]
(a) Foreign
(b) Primary
(C) Alternate
(d) Super
Answer:
(a) Foreign

Question 15.
Consider the following table and write relational al-gebra operations for the following: [MARCH – 2010] (3)
Student

RegnoNameMarkMark2Total
101ABC183654
102XYZ454893
103ZYX384684
104BCD454691
105DEF324173

a) To display those tuples from STUDENT relation where total is greater than 90.
b) To display cnly Regno and Name of all students.
Answer:
a) σTotal>90 (Student)
b) πRegno, Name (Student)

Question 16.
Briefly explain the different keys that are used in RDBMS. [MARCH – 2010] (4)
Answer:

  1. Candidate Key:lt is a set of attributes that uniquely identifies a row. There may be more than candidate key and may be a combination of more than one attribute.
  2. Primary Key : A primary key is one of the Candidate Keys. It is a set of one or more attributes that can uniquely identify tuples in a relation.
  3. Alternate Key: The Candidate key that is not the primary key is called the alternate key.
  4. Super Key : A combination of a primary key with any other attribute or group of attributes is called a super key.
  5. Foreign Key : Asingle attribute or a set of attributes, which is a candidate key in another table, is called foreign key.

Question 17.
Match the following with the levels of abstraction to which the users are primarily associated: [MARCH -2011] (3)
Levels of Abstraction – Users
1. Physical level – A. Naive users
2. Logical level – B. Database administrator
3. View level – C. Application programmer
Answer:
1) Physical Level – Database Administrator
2) Logical Level – Application programmer
3) View Level – Naive users

Question 18
A data model provides a way to represent data and their relationships. [MARCH -2011] (3)
a) Which data model assigns records to diferent levels of hierarchy?
b) Briefly explain the relational data model.
Answer:
a) Hierarchical Data Model
b) In relational data model data are stored as tables. Here the term relation means table. A table consists of rows and columns. Columns mean attributes and rows means tuples.

Question 19.
Explain how data is organized for effective storage and retrieval of information. [MARCH -2011] (2)
Answer:
There are three data models used for effective storage and retrieval of information. They are hierarchical, network and relational data models.

Question 20.
Which is not an RDBMS package? [MARCH -2011] (1)
a) Oracle
b) SQL Server
e) Mysql
d) HTML
Answer:
(d) HTML

Question 21.
The smallest unit of stored data in a database is [MARCH -2011] (1)
Answer:
Field

Question 22.
Mini created a relation in which two of the tuples have the same combination of values for all their at tributes.
Is this allowed? Give reason. [MARCH -2011] (2)
Answer 1.
No. It is not allowed because a good DBMS does not allow duplication of the same data. i.e. data redundancy is not allowed.

Answer 2.
Yes. Same values of data is allowed if primary key or unique key is not defined in the relation.

Question 23.
What ¡s the importance of primary key? [MARCH -2011] (2)
Answer:
Key: A pnmary key is one of the Candidate Keys. It is a set of one or more attributes that can uniquely identify tiiples in a relation.

Question 24.
Discuss the levels of data abstraction in DBMS. [March – 2016] (3)
Answer:
1) Physical Level is the lowest level.lt describes how ‘ the data is actually stored in the storage medium. At physical level complex low-level data structures are described in detail.

2) Logical level describes what data are stored in the database and what relationships exist among data. Here database is described in terms of simple structures. Records are defined in this level. Programmers work at this level.

3) View level is the highest level of data abstraction. It is concerned with the way in which the users view the database. It describes only part of the database.

Question 25.
In the ACCOUNT relation shown below [March – 2016]

Acc.Number Name Balance Type
1000 Simon 1,50,000 SB
i001 Abey 2,00,000 SB
1002 jambal 1,00,000 SB
1003 Ram 2.50,000 SB

a) Identify the primary keys and candidate keys.
b) Select all account holders with balance greater than Rs. 2,00,000. (2)
Answer:
a) Primary key-ACC. Number
Candidate keys – Name and Balance

b) σ2Balance>200000 (ACCOUNT)
OR
Select * from Account where Balance>200000

Question 26.
What are the major advantages of the relational model over other data models? [May-2016] (1)
Answer:
The relational data model has no redundancy and no complexity.

Question 27.
a) Classify the following operations in relational algebra into unary and binary operations:
(1) UNION
(2) SELECT
(3) SET DIFFERENCE
(4) PROJECT (1)

b) Explain about SELECT, INTERSECTION and SET DIFFERENCE operations with example. [May-2016] (3)
Answer:
a) Unary Binary
(2) SELECT
(1) UNION
(4) PROJECT
(3) SET DIFFERENCE

b) SELECT operation
SELECT operation is used to select tuples in a relation that satisfy a selection condition. Greek letter cr (sigma) is used to denote the operation.

Syntax,
σCondition (relation)

eg. σSalary<100000 (EMPLOYEE)-selects tuple whose salary is less than 10000 from EMPLOYEE relation.

Intersection operation
This operation returns a relation consisting of all the tuples appearing in both of the specified rela-tions. It is denoted by n. It can takes place only on compatible relations, e.g. FOOTBALL ∩ CRICKET returns the players who are in both football and cricket teams.

Set difference operation (-)
All tuples appearing in the first relation and not in the second.

Question 28.
a) Discuss the advantages of DBMS. (3)
b) Create a database schema for the relation VEHICLE. [MARCH -2017] (2)
Answer:
a) Advantages of DBMS
1) Data Redundancy-It means duplication of data. DBMS eliminates redundancy. DBMS does not store more than one copy of the same data.

2) Inconsistency can be avoided – If redundancy occurs there is a chance to inconsistency. If redundancy is removed then inconsistency cannot occur.

3) Data can be shared – The data stored in the database can be shared by the users or programs.

4) Standards can be enforced – The data in the database follows some standards. Eg: a field ‘Name’ should have 40 characters long. Some standards are ANSI, ISO, etc.

5) Security restrictions can be applied – The data is of great value so it must be kept secure and private. Data security means the protection of data against accidental or intentional disclosure or unauthorized destruction or modification by unauthorized person.

6) Integrity can be maintained – It ensures that the data is to be entered in the databse is correct.

7) Efficient data access – It stored huge amount of data efficiently and can be retrieved whenever a need arise.

8) Crash recovery – Sometimes all or a portion of the data is lost when a system crashes. A good DBMS helps to recover data after the system crashed.

b)

RegNoOwner NameMakeYear of MfrCub_Capacity
KL-45-L-100AchuthTOYOTO20152500
KL-45-N-1000RAJUHONDA20161100
KL-45-PJOSEMARUTHI20171000

Question 29.
_________ in a table gives the complete data of a particular entity. [May – 2017]
a) Tuple
b) Attribute
c) Domain
d) Schema (1)
Answer:
d) Schema

Plus Two Computer Science Chapter Wise Assess Questions and Answers

Question 1.
Who is responsible for managing and controlling the activities associated with the database? (1 Mark)
a) Database administrator
b) Programmer
c) Native user
d) End user
Answer:
a) Database administrator

Question 2.
In the relational model, cardinality is the _______ . (1 Mark)
a) numberoftuples
b) number of attributes
c) number of tables
d) number of constraints
Answer:
a) numberoftuples

Question 3.
Cartesian product in relational algebra is _______ . (1 Mark)
a) a Unary operator
b) a Binary operator
c) a Ternary operator
d) not defined
Answer:
b) a Binary operator

Question 4.
Abstraction of the database can be viewed as _________ . (1 Mark)
a) two levels
b) four levels
c) three levels
d) one level
Answer:
c) three level

Question 5.
In a relational model, relations are termed as __________ . (1 Mark)
a) tuples
b) attributes
c) tables
d) rows
Answer:
c) tables

Question 6.
In the abstraction of a database system the external level is the ___________ . (1 Mark)
a) physical level
b) logical level
c) conceptual level
d) view level
Answer:
d) view level

Question 7 (1 Mark)
Related fields in a database are grouped to form a ___________ .
a) data file
b) data record
c) menu
d) bank
Answer:
b) data record

Question 8.
A relational database developer refers to a record as ___________ . (1 Mark)
a) criteria
b) relation
c) tuple
d) attribute
Answer:
c) tuple

Question 9.
An advantage of the database management approach is ___________ . (1 Mark)
a) data is dependent on programs
b) data redundancy increases
c) data is integrated and can be accessed by multiple programs
d) none of the above
Answer:
c) data is integrated and can be accessed by multiple programs

Question 10.
Data independence means (1 Mark)
a) data is defined separately and not included in programs
b) programs are not dependent on the physical at-tributes of data
c) programs are not dependent on the logical at-tributes of data
d) both (b) and (c)
Answer:
d) both (b) and (c)

Question 11.
Key to represent relationship between tables is called ___________ . (1 Mark)
a) primary key
b) candidate Key
c) foreign Key
d) alternate Key
Answer:
c) foreign key

Question 12.
Which of the folowing operations is used if we are interested only in certain columns of a table? ___________ . (1 Mark)
a) Projection
b) Selection
c) Union
d) Select
Answer:
a) Projection

Question 13.
Which of the following operations need the partici-pating relations to be union compatible? ___________ . (1 Mark)
a) UNION
b) INTERSECTION
c) SET DIFFERENCE
d) All of the above
Answer:
d) All of the above

Question 14.
Which database level is closest to the users? ___________ . (1 Mark)
a) External
b) Internal
c) Physical
d) Conceptual
Answer:
a) View level (External)

Question 15.
The result of the UNION operation between R1 and R2 is a relation that includes ___________ . (1 Mark)
a) all the tuples of R1
b) all the tuples of R2
c) all the tuples of R1 andR2
d) all the tuples of R1 and R2 which have common columns
Answer:
(d) All the tuples of R1 and R2 (eliminating the duplication)

Question 16.
A file manipulation command that extracts some of the records from a file is called ___________ . (1 Mark)
a) Select
b) Project
c) Join
d) Product
Answer:
a) select

Question 17.
An instance of relational schema R (A, B, C) has distinct values of A including NULL values. Which one of the following is true? ___________ . (1 Mark)
a) A is a candidate key
b) A is not a candidate key
c) A is a primary key
d) Both (a) and (c)
Answer:
a) A is a candidate key

Question 18.
How many distinct tuples are there in relation instance with cardinality 22? ___________ . (1 Mark)
a) 22
b) 11
c) 1
d) none
Answer:
a) 22

Question 19.
A set of possible data values is called ___________ . (1 Mark)
a) Attribute
b) Degree
c) Tuple
d) Domain
Answer:
d) Domain

Question 20.
Why should you choose a database system instead of simply storing data in conventional files? (5 Mark)
Answer:
Advantages of DBMS over conventional files Data Redundancy – It means duplication of data. DBMS eliminates redundancy. DBMS does not store more than one copy of the same data. Inconsistency can be avoided – If redundancy occurs there is & chance to inconsistency. If redundancy is removed then inconsistency cannot occur.

Efficient data access -: It stored huge amount of data efficiently and can be retrieved whenever a need arise.

Data can be shared – The data stored in the database can be shared by the users or programs. Standards can be enforced – The data in the database follows some standards. Eg: a field ‘Name’ should have 40 characters long. Some standards are ANSI, ISO, etc.

Security restrictions can be applied – The data is of great value so it must be kept secure and private. Data security means the protection of data against accidental of intentional disclosure or unauthorized destruction or modification by unauthorized person.

Integrity can be maintained – It ensures that the data is to be entered in the database is correct.

Crash recovery- Some times all ora portion of the data is lost when a system crashes. A good DBMS he’psto recover data after the system crashed.

Question 21.
Explain the different levels of data abstraction in DBMS? (3 Mark)
Answer:
Levels of Database Abstraction –
1) Physical Level (Lowest Level) – It describes how the data is actually stored in the storage medium.
2) Logical Level (Next Higher Level) – It describes what data are stored in the database.
3) View Level (Highest level) – It is closest to the users. It is concerned with the way in which the individual users view the data.

Question 22.
How are schema layers related to the concepts of logical and physical data independence? (3 Mark)
Answer:
Data Independence – It is the ability to modify the scheme definition in one level without affecting the scheme definition at the next higher level.
a) Physical Data independence – If is the ability to modify the physical scheme without causing application programs to be rewritten.
b) Logical Data Independence – It is the ability to modify the logical scheme without causing application programs to be rewritten.

Question 23.
Consider the instance of the EMPLOYEE relation shown in the following table. Identify the attributes, degree, cardinality and domain of Name and Emp_code. (3 Mark)

EmpCodeNameDepartmentDesignationSalary
1000SudheeshPurchaseManager25000
1001DhanyaSalesManager25000
1002FathimaMarketingClerk12000
1003ShajanSalesClerk13000

Answer:
Attributes- These are column names, i.e, Emp_Code, Name, Department, Designation and Salary Degree(CD) -the number of Columns is the Degree
i. e Degree is 5(Here 5 columns)
Cardinality (RC)-: the number of Rows is the Cardinality
i. e. Cardinality is 4(Here 4 rows)
Domain is the pool of possible values
Domain of Name is a String(Sudheesh, Dhanya,
Fathima, Shajan.etc)
Domain of Emp_Code is a number (1000,1001,1002, 1003, etc)

Question 24.
Identify primary key, candidate keys and alternate keys in the instance of EMPLOYEE relation in Question 23. (3 Mark)
Answer:
Candidate key – It is used to uniquely identify the row.
Emp_code and Emp_Code + Department (Composite) are the candidate keys
Primary key – It is a set of one or more attributes used to uniquely identify a row.
Empjcode is the primary key
Alternate key – A candidate key other than the primary key.
We set Emp_code as the primary key then Emp_code+ Department is the alternate key

Question 25.
Consider the instance of the STUDENT relation shown in the following table Assume Reg_no as the primary key. (3 Mark)
a) Identify the candidate keys and alternate keys in the STUDENT relation
b) How are the primary key and the candidate key-related?

Reg_noNameBatchResultMarks
101SachinSciencePass480
103 –FathimaHumanitiesFall200
106JosephCommercePass360
108BincySciencePass300

Answer:
a) Reg_no and Reg_no+Batch are the candidate keys. We set Reg_no as the primary key hence Reg_no+Batch is the alternate key
b) Candidate Key :lt is a set of attributes that uniquely identifies a row. There may be more than candidate key and may be a combination of more than one attribute.

Primary Key: A primary key is one of the Candidate Keys. It is a set of one or more attributes that can uniquely identify tuples in a relation.

Question 26.
What is a database? Describe the advantages and disadvantages of using DBMS. (5 Mark)
Answer:
A Database is a collection of large volume of data.

Advantages of DBMS
Data Redundancy – It means duplication of data. DBMS eliminates redundancy. DBMS does not store more than one copy of the same data.
Inconsistency can be avoided – If redundancy occurs there is a chance to inconsistency. If redundancy is removed then inconsistency cannot occur. Efficient data access It stored huge amount of data efficiently and can be retrieved whenever a need arise.

Data can be shared – The data stored in the database can be shared by the users or programs.

Standards can be enforced – The data in the database follows some standards. Eg: a field ‘Name’ should have 40 characters long. Some standards are ANSI, ISO, etc.

Security restrictions can be applied – The data is of great value so it must be kept secure and private. Data security means the protection of data against accidental or intentional disclosure or unauthorized destruction or modification by unauthorized person.

Integrity can be maintained – It ensures that the data is to be entered in the database is correct.

Crash recovery- Sometimes all ora portion of the data is lost when a system crashes . A good DBMS helps to recover data after the system crashed.

Question 27.
What is data independence? Explain the difference between physical and logical data independence. (3 Mark)
Answer:
Data Independence – It is the ability to modify the scheme definition in one level without affecting the scheme definition at the next higher level.
a) Physical Data Independence – It is the ability to modify the physical scheme without causing application programs to be rewritten.
b) Logical Data Independence – It is the ability to modify the logical scheme without causing application programs to be rewritten.

Question 28 (3 Mark)
Enforcement of standard is an essential feature of DBMS. How are these standards applicable in a da-tabase?
Answer:
There is a standard BIS (Bureau of Indian Standards) in the field of Gold and ISBN (International Standard Book Number) in the field of publication. Similarly here is also some standards like ANSI(American National Standards Institute), ISO (International Organization for standardization), etc.. For example a filed “Name” should have 40 characters is a standard.

Question 29.
Cardinality of a table T1 is 10 and of table T2 is 8 and the two relations are union compatible. If the cardi-nality of result T1 ∪ T2 is 13, then what is the cardi-nality of T1 ∩ T2? Justify your answer. (3 Mark)
Answer:
Cardinalty of table T1 is 10 means it has 10 rows Cardinalty of table T2 is 8 means it has 8 rows Normally T1 ∪ T2 is 10+8 = 18 But Here T1 ∪ T2 is 13 means after eliminating duplication of 5 rows this happened.

This means 5 rows are common. That is T1 ∩ T2 is 5

Question 30.
CardinalityofatableTI is10andoftableT2is8and the two relations are union compatible. (3 Mark)
a) What will be the maximum possible cardinality of T1 ∪ T2?
b) What will be the minimum possible cardinality of T1 ∩ T2?
Answer:
a) Degree(CD) -the number of Columns is the Degree Cardinality (RC)-: the number of Rows is the Cardinality T1 ∪ T2 = Sum of cardinalities of Table 1 and Table 2
i. e.T1 ∪ T2 = 10 + 8 = 18

b) T1 ∩ T2 is the common rows(tuples) in T1 and T2 If there is no common tuples then T1 ∩ T2 is 0 hence the cardinality is 0.

Question 31.
Conside the relations, City (city_name, state) and Hotel (name, address, city_name). Answer the following queries in relational algebra (5 Mark)
a) Find the names and address of hotels in Kochi.
b) List the details of cities in Kerala state.
c) List the names of the hotels in Thrissur.
d) Find the names of different hotels.
e) Find the names of hotels in Kozhikode or Munnar.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 8 Database Management System 1

Question 32.
Using the instance of the EMPLOYEE relation shown in question 23, write the result of the following relational algebra expressions. (5 Mark)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 8 Database Management System 2
Answer:
a)

Emp_CodeName DepartmentDesignation : Salary
1001Dhanya SalesManager : 25000
1003Shajan SalesClerk : 113000

b)

Emp_CodeNameDepartmentDesignationSalary
1001DhanyaSalesManager25000

c)

Emp CodeNameDepartmentDesignationSalary
1000SudheeshPurchaseManager25000
1001DhanyaSalesManager25000
1003ShajanSalesClerk13000

d)

NameSalary
Sudheesh25000
Dhanya25000
Fathima12000
Shajan13000

e)

NameSalary
Sudheesh25000
Dhanya25000

f) No rows selected

Question 33.
Consider the instance of the BORROWER and DE- POSlTOR relations shown in following figure which stores the details of customers in a Bank. Answer the following queries in relational algebra. (5 Mark)
a) Display the details of the customers who are either a depositor or a borrower.
b) Display the name of customers who are both a depositor and a borrower.
c) Display the details of the customers who are d positors but not borrowers.
d) Display the name and’amount of customer who is a borrower but not depositor.

BorrowerDepositor
Acc_NoNameAmountAcc_NoNameAmount
AC123juwee50000AC123juwee500
AC103Rasheeda25000.AC105Shabana25000
AC106Vishnu25000AC116Vishnu125000
AC108Aiswarya30000AC108Aiswarya3000

Answer:
a)

Acc_NoName
AC 123Albin
AC 105Shabana
AC116Vishnu
AC108Aiswarya
AC103Rasheeda
AC 106Vishnu

b)

Acc_NoName
AC123Albin
AC108Aiswarya

c)

Acc_NoName
AC105Shabana
AC116Vishnu

d)

NameAmount
Rasheeda25000
Vishnu25000

Question 34.
Consider the instance of the CUSTOMER and BRANCH relations shown in the following table. Write the Cartesian Product of the two relations. (3 Mark)

CUSTOMER
Acc_NoNameBranchJDAmount
AC123AlbinB100150000
AC103RasheedaB100125000
AC106VishnuB100125000
BRANCH
BranchJDName
B1001Kochi
B1002Guruvayur
B10TTIduki

Answer:

CUSTOMER X BRANCH
Acc NoNameBranch IDAmountBranch IDName
AC123AlbinB100150000B1001Kochi
AC 123AlbinB100150000B1002Guruvayur
AC123AlbinB100150000B1077Idukki
AC103RasheedaB100125000B1001Kochi
AC103RasheedaB100125000B1002Guruvayur
AC 103RasheedaB100125000B1077Idukki
AC 106VishnuB100125000B1001Kochi
AC106VishnuB100125000B1002Guruvayur
AC106VishnuB100125000B1077Idukki
AC 108AiswaryaB107730000B1001Kochi
AC108AiswaryaB107730000B1002Guruvayur
AC108AiswaryaB107730000B1077Idukki

Plus Two Computer Science Chapter Wise Previous Questions Chapter 7 Web Hosting

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 7 Web Hosting.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 7 Web Hosting

Question 1.
What type of hosting will you use to support a government website? Give its advantages. [March – 2016] (2)
Answer:
Types of web hosting: Various types of web hosting services are available. We can choose the web host¬ing services according to our needs depends upon the storage space needed for hosting, the number of visitors expected to visit, etc.

1) Shared Hosting : This type of hosting sharing resources, like memory, disk space and CPU hence the name shared. Several websites share the same server. This is suitable for small websites that have less traffic and it is not suitable for large websites that have large bandwidth, large storage space and have large volume of traffic.

Eg:
Shared hosting is very similarto living in an Apartment(Villas) complex. All residents are in the same location and must share the available resources(Car parking area, Swimming pool, Gymnasium, playground, etc) with everyone.

2) Dedicated Hosting : A web server and its resources are exclusively for one website that have large volume of traffic means large volume of requests by the visitors. Some Govt, departments or large organizations require uninterrupted services forthat round the clock power supply is needed. It is too expensive but it is more reliable and provide good service to the public.

Eg:
It is similar to living in an Our own house. All the resources in your house are only for you. No . one else’s account resides on the computer and would not be capable, of tapping into your resources.

3) Virtual Private Server (VPS): A VPS is a virtual machine sold as a service by an Internet hosting Service. A VPS runs its own copy of an OS (Operating System) and customers have super level access to that OS instance, so they can install almost any s/wthat runs on that OS. This type is suitable for websites that require more features than shared hosting but less features than dedicated hosting.

Eg:
It is similar to owning a Condo

Question 2.
a) List the factors to be taken into consideration while buying hosting space on a web server. [May – 2016] (2)
b) What type of web page designing is called responsive web design? (1)
Answer:
a) It depends upon the storage space needed for hosting, the number of visitors expected to visit, etc.
b) Responsive web design means the home page of the website is displayed differently according to the screen size of the browsers window (mobile phone, palmtop, tablet, laptop, and desktop) we used.

Question 3.
An example of a virtualization software is ………………. [March – 2017] (1)
Answer:
VMware / Virtualbox / Free VPS / Usermode Linux / Microsoft Hyper-V

Question 4.
Discuss steps involved in registering the domain name of your school web site. [March – 2017] (2)
Answer:
Millions of websites are available over Internet so that, our school website must be registered with a suitable name. Domain Name registration is used to identify a website over Internet. A domain name must be unique(i.e. no two website with same name is available). So we have to check the availability of domain name before we register it, for this www.whois.net website will help. If the domain name entered is available then we can register it by paying the Annual registration fees through online.

Consider a Post Office, it has two addresses one string address (Irinjalakuda) and one numeric(pin) code (680121). Just like this the website has also two addresses a string address for example www.agker.cag.gov.in and a numeric address (http:/ /210.212.239.70/). We are following string address, hence this domain name has to be connected to the corresponding IP address of the web server. This is done by using ‘A record’(Address record) of the domain. ‘A record’ is used to store the IP address and the corresponding domain name.

Question 5.
What is the advantage of using SFTP protocol in FTP software? [May – 2017] (3)
Answer:
Then FTP client software helps to establish a connection between the client computer and the remote server computer. Unauthorised access is denied by using username and password hence secure our website files for that SSH(Secure Shell) FTP simply SFTP is used.

Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 6 Client-Side Scripting Using JavaScript.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 6 Client-Side Scripting Using JavaScript

Question 1.
“TRUE AND FALSE are used to represent boolean values”. State if the above-given statement is correct or not. [March 2016] (1)
Answer:
Correct
Note: In the case of Javascript it is not correct.

Question 2.
Develop a webpage that implements a JavaScript function that takes two numbers as input and displays their product. [March 2016] (2)
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 1
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 2
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 3

Question 3.
Give the function in JavaScript that converts a string type data containing numbers to number type. [March 2016] (1)
Answer:
Number ()

Question 4.
a) Design a web page with form tag which accepts a number in a textbox and another textbox that should display either odd or even. Write a function in JavaScript to check whether the number is odd or even. [March 2016] (2)
OR
b) Develop a web page that accepts a number after validation and prints the factorial of it. (2)
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 4
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 5
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 6

Question 5.
JavaScript provides a large, number of built-in functions. [March 2016]
a) Name any two of them with an example. (2)
b) The property which returns the size of the string is ………………. (1)
Answer:
a) Refer Let us Asses Question 6
b) length property eg: x = “BVM”;
alert (x;length);

Question 6.
A virtual machine for executing JavaScript code is ______ . [March 2017] (1)
Answer:
JavaScript engine.

Question 7.
Discuss about six built-in functions used in JavaScript.
Answer:
Refer Let us Asses Question 6

Question 8.
Design a procedure in JavaScript that takes two strings as input and displays the concatenated strings as output. [March 2017] (2)
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 7
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 8

Question 9.
State whether the following statements are true or false: [May 2017]
a) JavaScript is the only client-side scripting language. (1)
b) JavaScript is a case sensitive scripting language. (1)
c) The keyword used to declare a variable in JavaScript is VAR. (1)
Answer:
a) false
b) false (The identifiers in JavaScript are case sensitive.)
c) true.

Question 10.
Predict the output of the following code: [May 2017]
<HTML>
<BODY>
<SCRIPT Language = “JavaScript”>
var i, s =0;
for (i=1; i<=10; i+=2)
s+=i;
document.write(“sum=”+s);
</SCRIPT>
</BODY>
</HTML> (2)
Answer:
The output is 25 (The sum of odd numbers less than 10)

Plus Two Computer Science Chapter Wise Practice Questions Chapter 6 Client-Side Scripting Using JavaScript

Question 1
Develop a web page to display the following screen. (3 Marck)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 9
User can enter a number in the first text box. On clicking the show button, product of all numbers from 1 to the entered limit should be displayed in the second text box.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 10

Question 2.
Develop a web to display the following screen (5 Mark)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 11
clicking the show button, Even or Odd should be displayed in the second text box depending on whether the number is even or odd.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 12
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 13

Question 3.
Develop a web page to display the following screen. (5 Mark)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 14
The user can enter an age in the text box. If the user enters an alphabet, instead of a number in the text box, on clicking the show button, it should display a message “Invalid Age” to the user. Otherwise it should display a message “Correct Data”.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 15
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 16

Question 4.
Develop a login page as shown in the following figure. (5 Mark)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 17
The page must contain one text box for entering the username and one password box for entering the password. The user name must contain at least 4 characters and the password must contain at least 6 characters. The first two characters in the password must be numbers. On clicking the show button, if the valid data are given in boxes, a message ‘‘Correct Data” should be displayed. Otherwise, “Wrong Data” message should be displayed.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 18
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 19

Question 5.
Develop a web page to implement a simple calculator. The page should have two text boxes to enter two numbers. It should also have 4 buttons to add, subtract, multiply and divide the two numbers. The answer should be displayed in a third text box on clicking the button. The web page should be as shown in the following figure. (5 Mark)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 20
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 21
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 22
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 23

Plus Two Computer Science Chapter Wise Assess Questions and Answers

Question 1.
Write the value of the variable z in each of the following (5 Mark)
a) var x,y,z;
x5;
y=3;
z++x—y—;
Answer:
z=6-3 = 3
Hence z = 3.

b) var xy,z;
x=”12″;
y=”13″;
z=x+y;
Answer:
z= “12” + 13 = 1213. If one of the operand is a string the two strings concatenates the strings.That is It concatenates two strings.

c) var x,y,z;
x=20;
y=8;
x %=y;
z=x++;
Answer:
x %=y means x=x%y.
that is x= 20 % 8.
i.e. x = 4.
Then z = 4. (x++ first use the value then change)

d) var x,y,z;
x=1;
y=4;
z= !(x<y);
Answer:
The answer is false.
z= !(1<4)
z = !(true)
z = false

e) var x,yz;
x=5;
y=6;
z (x>y) || (y% 2 == ());
Answer:
The answer is true.
Steps
z= (5>6) || (6%2())
= (false) || (0 == ())
= (false) || (true)
= true.

Question 2.
Predict the output of the following (5 Mark)
a) <HTML>
<BODY>
<SCRIPT Language’JavaScript’>
var i;
for(i=10;i>=1 ;i—)
document.write(i + “<BR>”);
</SCRIPT>
</BC DY>
</HTML>
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 24

Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 25
Answer:
The output is 2500.

Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 26
Answer:
The output is 275.

Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 27
Answer:
The output is 120 (5 factorial)

Question 3
Following is an html code segment in a web page (1 Mark)
<FORM Name=”frmStud”>
<INPUT Type-‘text” Name=”studentName”>
</FORM>
Fill in the blanks to store the value of the text box to the variable n.
varn;
n= __________;
Answer:
n=document.frmstud.studentName.value;

Question 4.
Suppose you have written a JavaScript function named check Data(). You want to execute the function when the mouse pointer is just moved over the button. How will you complete the following to do the same? (1 Mark)
<INPUTType=”button” _________ = ‘‘checkData()”>
Answer:
<INPUTType-’button” onMouseEnter= “checkData()”>

Question 5.
Explain <SCRIPT> tag and its attributes. (2 Mark)
Answer:
Scripts are small programs embedded in the HTML pages, to write scripts <SCRIPT> tag is used.

* Language attribute specifies the name of the scripting language used.
*Example:
<SCRIPT Language=”JavaScript”>
___________
</SCRIPT>

Question 6.
Write the syntax of a built-in function in JavaScript. (5 Mark)
Answer:
Built in functions(methods)
1) alert()- : This is used to display a message(dialogue box) on the screen.
eg: alert(“Welcome to JS”);

2) isNaN()-: To check whether the given value is a number or not. It returns a Boolean value. If the value is not a number(NaN) then this function returns a true value otherwise it returns a false value.

Eg:
1. isNaN(“BVM”); returns true
2. isNaN(8172); returns false
3. isNaN(“680121”); returns false
4. alert(isNaN(8172); displays a message box as false

3) tollpperCase() -: This is used to convert the text to upper case.
Eg:
var x=”bvm”;
alert(x.toUpperCase());
Output is as follows
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 28

4) toLowerCase():- This is used to convert the text to lowercase.
Eg:
var x=”BVM”;
alert(x.toLowerCase());
Output is as follows
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 29

5) charAt():- It returns the character at a particular position.
Syntax: variable.charAt(index);
The index of first character is 0 and the second is 1 and so on.
Eg:
var x=”HIGHER SECONDARY”;
alert(x.charAt(4));
Output is as follows
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 30

Eg.
var x=”HIGHER SECONDARY”;
alert(“The characters @ first position is “+ x.charAt(()));
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 31

6) length property-: It returns the number of characters in a string.
Syntax: variable.length;
Eg.
var x=”HIGHER SECONDARY”;
alert(“The number of characters is “+ x.length);
Output is as follows(note that space is a character)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 32

Question 7.
Classify the following values in JavaScript into suitable data types. (3 Mark)
“Welcome”, “123”, “true”, 67.4, .98, false, “hello”
Answer:
Number-: 67.4 and .98 .
String -: “Welcome”, “123”, “true” and “hello”. Boolean -: false.

Question 8.
What is meant by undefined data type in JavaScript mean? (2 Mark)
Answer:
undefined -: It is a special data type to represent variables that are not defined using var.

Question 9.
Explain operators in JavaScript. (5 Mark)
Answer:
Operators in JavaScript
Operators are the symbols used to perform an operation

1) Arithmetic operators
It is a binary operator. It is used to perform addition(+), subtraction(-), division(/), multiplication(*) ,modulus(%-givesthe remainder) ,increment(++) and decrement—) operations.
Eg. If x=10 and y=3 then

x+yx-yx*yx/yx%y
137303.3331

lfx=10then
document.write(++x); -> It prints 10+1=11
lf x=10then
document.write(x++); -> It prints 10 itself.
If x=10then
document.write(—x); It prints 10-1=9
lf x=10then
document.write(x—);-> It prints 10 itself.

2) Assignment operators
If a=10 and b=3 then a=b. This statement siets the value of a and b are same ,i.e. it sets a to 3. It is also called short hands
If X=10 and Y=3 then

Arithmetic Assignment ExpressionEquivalent Arithmetic ExpressionThe value of X becomes
X+=YX=X+Y13
X-=YX=X-Y7
X*=yX=X*Y30
X/=YX=X/Y3.333
X%=YX=X%Y1

3) Relational(Comparison) operators
It is used to perform comparison or relational operation between two values and returns either true or false.
Eg:
If X=10 and Y=3 then

X<YX<=YX>YX>=YX==YX!=Y
falsefalsetruetruefalsetrue

4) Logical operators
Here AND(&&), OR(||) are binary operators and NOT(!) is a unary operator. It is used to combine relational operations and it gives either true or false
If X=true and Y=false then

X&&XX&&YY&&XY&&Y
truefalseFalsefalse

Both operands must be true to get a true value in the case of AND(&&) operation
If X=true and Y=false then

X || XX || YY || XY || Y
truetruetruefalse

Either one of the operands must be true to get a true value in the case of OR(||) operation
If X= true and Y=false then

!X!Y
falsetrue

5) String addition operator(+)
This is also called a concatenation operator. It joins (concatenates) two strings and forms a string.

Eg:
var x,y,z;
x= “BVM HSS”;
y= “Kalparamba”;
z=x+y;

* Here the variable z becomes “BVM HSS Kalparamba’’.
Note : If both the operands are numbers then addition operator(+) produces number as a result otherwise it produces string as a result.

Consider the following

Operand 1 data typeOperand 2 data typeOperationResultant data type
numbernumbernumber
numberstring+(addition)string
stringnumberstring
stringstringstring

Eg:
1) 8(number) + 3(number)=11 (Result is a number)
2) 8 (number)+ “3″( string) = “83” (Result is a string)
3) “8” (string) + 3 (number) = “83”(Result is a string)
4) “8” (string) + “3” (string) = “83” (Result is a string)

Question 10.
Write JavaScript functions to perform the following (5 Mark)
a) To check whether a variable N contains a number
b) To convert the string “scert” to all capitals.
c) To convert the string “HTML” to all small letters.
d) To display a message “Welcome to functions”.
e) To display the third character in the string “Computer”.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 33
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 34
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 35
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 36
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 37

Question 11.
Write JavaScript code to display the length of the string “Computer”. (3 Mark)
Answer:

<HTML>
<head>
<title>
length of a string
</title>
</head>
<BODY>
<SCRIPT Languages’JavaScript”>
var str.len;
str=”Computer";
len=str. length;
alert('The length of the string Computer is “+len);
</SCRIPT>
</BODY>
</HTML>

Question 12.
A web page contains a button. Write HTML code for the button which executes a function Message() on the occurrence of the following events. (2 Mark)
a) When a user clicks the mouse on the button.
b) When user moves the mouse over the button.
Answer:
a) <inputtype=”button”value=”Message”
onClick=”Message()”>

b) <input types”button” value=”Message”
onMouseEnter=”Message()”>

Question 13.
What are the advantages of writing JavaScript code in the head section of an HTML page? (2 Mark)
Answer:
Scripts can be placed inside the <HEAD> section. This method is widely accepted method. The main reason for this is that body section contains a large volume of text contents to be displayed on the web page. More over the head section is loaded before the body section.

Question 14.
Design an HTML page that contains a text box to enter the marks in a given subject. (5 Mark)
a) Write HTML code for this web page
b) Provide validations for this text box in a separate JavaScript file and link it with the HTML file. The validations are
(i) it should not be empty
(ii) it should be a number
(iii) it should be between 0 and 60.
c) List the advantages of writing the script in a separate file.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 39
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 40
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 41
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 42

c) We can write scripts in a file and save it as a separate file with the extension .js. The advantage is that this file can be used across multiple HTML files and can be enhance the speed of page loading.

Plus Two Computer Science Chapter Wise Previous Questions Chapter 5 Web Designing Using HTML

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 5 Web Designing Using HTML.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 5 Web Designing Using HTML

Question 1.
Considerthe following HTML statement. [MARCH – 2007]
<Table>
<TR>
<TH>Mark</TH>
<TD>90</TD>
</TR>
</Table>
What is the difference between the content displayed in the cells of the table? (2)
Answer:
<TH> means table heading
<TD> means table data
‘Mark’ is contained in <TH></TH>. It will displayed as Table Heads in Bold letter.
90 is contained in <TD></TD>. It will displayed as normal letters.

Question 2.
While designing a web page Raju wants to display a table which occupies the full browser window. Name the attribute which help him to do so. [MARCH – 2007] (1)
Answer:
The attribute is Width,it can be given in percentage of total window width.
Eg. <Table Border=1 Width= “100%”>

Question 3.
Complete the following table. [MARCH – 2007] (3)

HTML TagUse
1. <B>
2. <HR>
3Un ordered List
4. <DL>
5It is the line break tag
6To display Heading in the biggest size

Answer:

HTML TagUse
1. <B>To display content in Bold
2. <HR>Draws a Horizontal Ruler
3. <UL>Un ordered List
4. <DL> ‘Define Definition List
5. <Br>It is the line break tag
6, <H1>To display Heading in the biggest size

Question 4
Abhijith wishes to submit the data entered by him using a form. The amount of data is less and security of data is not a prime factor. Which method he may select to submit the data ? justify your answer. [MARCH – 2008] (4)
Answer:
Get method

Question 5
Match the following [MARCH – 2008]

<HTML> HREF
<A> SIZE
<BODY> SRC
<BASEFONT> START
<OL> DIR
<IMG> TOPMARGIN

Answer:

<HTML> DIR
<A> HREF
<BODY> TOPMARGIN
<BASEFONT> SIZE
<OL> START
<IMG> SRC

Question 6.
Some browsers do not support frameset. In such a situation which alternative is used. Explain? [FEBRUARY – 2008] (3)
OR
Mention how <NOFRAMES> tag can help us.
Answer:
It is true, some browsers do not support frameset. In such a situation the container tag <noframes> is the alternative for frameset. It specifies the content to be shown, if the browser cannot load the frames. The content is given in a body section placed within the <noframes> tag pairs.

Question 7.
Classify the HTML related words : [FEBRUARY – 2008] (2)
Align, Frame, Href, Font.
Answer:
Attribute-Align, Href. Tag-Frame, Font

Question 8.
Aji wants to create a form in HTML to do the following: [JUNE – 2008]
1) Input name using text box.
2) Two Radio Buttons to select Male or Female.
3) InputAddress.
4) Submit Button with caption ‘OK’
Write HTML program forthe above. (5)
Answer:
1) <inputtype=’’text>
2) <inputtype=”radio” name=”sex” value=”male”> <inputtype=”radio” name-’sex” value=”female”>
3) <input type=”textarea>
4) <inputtype=”Submit” value=”ok”>

Question 9.
Midhun wants to create a web page for passing information from the user to the web server. Name the HTML tag which provides this facility. [MARCH – 2009] (1)
Answer:
<form> tag

Question 10.
Which tag can be used to provide hyperlinks in HTML? [MARCH – 2009] (1)
Answer:
<A> Tag

Question 11.
Write an HTML code to create a form with controls to accept the Reg no. of a student and to submit it. [MARCH – 2009] (2)
Answer:
<Form Method=”Get”Action=”http://www.dhse.com/ det.asp”>
Regno<inputtype=”text”><br>
<input type=”submit” value=”Submit>
</form>

Question 12.
Varun is creating a web page. He wants to create a link on the text ‘sample’ to a file named sample, htm which resides in a subdirectory named Exam of the D drive. Write the HTML command for this purpose. [MARCH – 2009] (2)
Answer:
<A Href = “D:\Exam\sample.htm”> Sample</A>

Question 13.
The default align value for a table is _________ [February – 2009]
(a) left
(b) right
(c) top
Answer:
left

Question 14.
Shabeer wants to divide the browser wondow into two sections. Which option of HTML can be used for this? [June – 2009] (1)
Answer:
<frameset>

Question 15.
Write an HTML code to create a select box with three list options low, medium and high with medium as default item. [June – 2009] (2)
Answer:

<html>
<head>
<title>
select box
</title>
</head>
<body>
<select>
<option>low
<option selected>medium
<option>high
</select>
</body>
</html>

Question 16.
Find out the output forthe following HTML statements and describe the tags using. [March -2010] (5)

<HTML>
<BODY>
<TABLE BORDER=1>
<TR>
<TD Colspan=2>College</TD>
</TR>
<TR>
<TR Rowspan=3>
</TR>
<TR>
<TD>Department1</TD>
</TR>
<TR>
<TD>Department 2</TD>
</TR>
<TR>
<TD>Department 3</TD>
</TR>
</TABLE>
</BODY>
</HTML>

Answer:
<HTML> tag is used to start the program.
<Body> Here contents are to be written.
<TABLE> is used to create a table.
<TR> is used to create a row.
<TD> is used to give table column data.

College
DepartmentsDepartment 1
Department 2
Department 3

Question 17.
Write the HTML code for creating the following Webpage: [March -2010] (3)
ABC Pvt. Ltd.
HYDERABAD
1 .Health Care
2. Baby Products
a. Toys
b. Dress
3. Men’s Wear
* Casuals
* Formals
Answer:

<HTML>
<HEAD>
<TITLE> ABC Pvt.Ltd</TITLE>
<1HEAD>
<BODY>
<HI> ABC Pvt. Ltd. <Br>HYDERABAD</HI>
<OL>
<LI>HealthCare
<LI>Baby products
<OLType=”a”>
<L>Toys
<LI>Dress
</OL>
<LI> Mens Wear
<UL>
<LI>Casuals
<LI>Formals
</UL>
</OL>
</BODY>
</HTML>

Question 18.
Write the HTML code for the following table. [June – 2010] (3)

SubjectMark
SciencePhysics40
Chemistry35
Biology48

Answer:

<html>
<head>
<title>
</title>
</head>
<body>
<table border=”1 ">
<tralign=”center”>
<td colspan=2>Subject
<td>mark
</tr>
<tralign=”center”>
<td rowspan=3>Science
<td>Physics
<td>40
</tr>
<tr align=”center”>
<td>Chemistry
<td>35
</tr>
<tralign=”center”>
<td>Biology
<td>48
</tr>
</table>
</body>
</html>

Question 19.
The tag used to create a menu in HTML is ……………… . [June – 2010] (2)
Answer:
<SELECT>

Question 20.
Write HTML tag to create a form with a text box and a submit button. [June – 2010] (2)
Answer:

<html>
<head>
<title>form
</title>
</head>
<body>
<form>
<input type=”text”>
<input type=’submit”>
</Body>
</HTML>

Question 21
List the steps for creating a hyperlink with an example. [June – 2010] (2)
Answer:
The power of HTML lies in the ability to provide hyperlinks. <A> tag is used for this. There are two types of Linking.
1) External Linking. External links are hyperlinks given to another page. By clicking on hypertext we can link or go to other webpages.
<A> Anchor tag is used for External Linking.
<A href= “c:\main. html”>Main</A>

2) Internal Linking- Internal Links are given to a section in the same document.
<HTML>
<HEAD>
<Title>lnternal linking</Title>
</HEAD>
<Body>
<p><A name=”Bio”>Biology Group</A><BR>
Subject combinations are Physics, Chemistry, Mathematics and Biology. <P>
<P><A Name= “comp”> computergroup</A> <BR>
Subject combination are Physics, Chemistry, Mathematics and Computer Science. <P>
<P><A name = “Comm’’> Commerce Group</A> <BR>
The subject combination are Business studies, Economics, Accountancy and Computer Application
<br><A href=”#Bio’’>Go Biology</A>
<br><A href=”#Comp”>Go Computer</A>
<br><A href=”#Comm’’>Go Commerce</A>
</p>
</Body>
</HTML>

Question 22.
Write a HTML code for displaying the following table. [March -2011] (3)

Object Property Value
Form 1 Caption First Form
Command 1 Caption Show Next
Command 2 Caption Exit

Answer:

<html>
<head>
<title>
table
</title>
</head>
<body bgcolor=’ ’vbcyan”>
<table border=1>
<tr>
<th>Objectc/th>
<th>Property</th>
<th>Valu e<Ith>
</tr>
<tr>
<td>Form1</td>
<td>Caption</td>
<td>First Form</td>
</tr>
<tr>
<td>Command1 </td>
<td>Caption</td>
<td>Show Next</td>
</tr>
<tr>
<td>Command2</td>
<td>Caption</td>
<td>Exit</td>
</tr>
</body>
</html>

Question 23.
In HTML, FORM tag can accept user input and communicate it to a server program. [March -2011]
(a) Write the general format of FORM tag. (1)
(b) How will you Construct a ‘SUBMIT’ button and a RESET’ button within the FORM tag? (2)
Answer:
a) <form action=url/mailto method=get/post> </form>
b) <input type=”submit”>
<input type=”reset”>

Question 24.
HTML has the facility to provide External links as well as Internal links. [March -2011] (3)
a) Which tag is used to include an External link?(1)
b) How will you construct an Internal link? (2)
Answer:
a) Anchor Tag i.e. <a href=”filename”>
b) Internal link is used to linktwo places of the same web page

<html>
<head>
<title>
Internal link
</title>
</head>
<body bgcolor=”vbcyan”>
<a name=top href=#bottom>Goto Bottom</a>
<ultype=”circle”>
<li>Form
<li>TextBox
<li>Label
<li>CommandButton
</ul>
<a name=bottom href=#top>Goto top</a> </body>
</html>

Question 25.
Write the HTML code for creating the following table: [March – 2012] (3)
Item – Price – Qty.
Soap – 15 10
Book – 23 12
Pen – 10 14
Answer:

<html>
<head>
<title>
table
</title>
</head>
<body>
<table bonder=1> <tr>
<th>ltem</th>
<th>Price</th>
<th>Qty</th>
</tr>
<tr>
<td>Soap</td>
<td>15</td>
<td>10</td>
</tr>
<tr>
<td>Book</td>
<td>23</td>
<td>12</td>
</tr>
<tr>
<td>Pen</td>
<td> 10</td>
<td> 14</td>
</tr>
</table>
</body>
</html>

Question 26.
Suggest an alternate tag for a browser which do not support frames tag. [March – 2012] (1)
Answer:
<Noframes>

Question 27.
What is the importance of .NET technology? [March – 2012] (2)
Answer:
NET is one of the latest technologies introduced by Microsoft Corporation. With the help of .NET a de veloper can use a programming language of his choice to quickly and easily develop distributed ap plications. Distributed application means process ing take place in any processor is free in the net work. It Is similar to JVM. It is platform independent.

Eg:ASP.NET, VB.NET

Question 28.
The <DD> tag gives _________ [March 2016] (1)
Answer:
Data Description or Data Definition.

Question 29.
Create a table with 5 types of fruit names, use headings as serial number, name and cost.
OR
Create an ordered list of five fruits numbered using small Roman numerals. (5)
Answer:

<html>
<head>
<title>
table creation
</title>
</head>
<body bgcolor =“red”>
<table bonder = “1”>
<tr>
<th> Serial No</th>
<th> Name </th>
<th> cost</th>
</tr>
<tr>
<td>1</td>
<td> Banana </td>
<td> Rs. 49 </td>
</tr>
<tr>
<td>2</td>
<td>grapes</td>
<td>Rs.110</td>
</tr>
<tr>
<td>3</td>
<td>Apple</td>
<td>Rs.180<ftd>
</tr>
<tr>
<td>4</td>
<td>Orange</td>
<td>Rs.60</td>
<td>5</td>
<td>Mango</td>
<td>Rs. 40<ltd>
</tr>
</table>
</body>
</html>
<html>
<head>
<title>
Ordered list demonstration
</title>
</head>
<body bgcolor=red;
<H1> Fruits </H1>
<OLType= "i">
<li> Apple </ii>
<li>Grapes </li>
<li>Orange </li>
<li> Mangoc/li>
<li> Banana </li>
</OL>
</ Body>
</html>

Question 30.
Rahim wants to connect his webpage to www.yahoo.com. Write the tag and attributes required for these. [May – 2016] (2)
Answer:
<A> tag with href attribute is used for this
eg: <A href= “httpp://www.yahoo.com”>
Yahoo</A>

Question 31.
a) What are the difference between GET and POST methods in form submitting? [May – 2016] (2)
b) Study the following steps and determine the correct order:
(1) Open a connection to MySQL server
(2) Execute the SQL query
(3) Fetch the data from query
(4) Select database
(5) Close connection
(a) 4, 1,2, 3, 5
(b) 1,4, 2. 3, 5
(c) 1,5, 4, 2, 3
(d) 4,1,3, 2, 5 (1)
Answer:
a) Refer 3 Mark Question 12
b) (b) 1,4, 2, 3; 5

Question 32.
A link to a particular section of the same document is called …………….. [March – 2017] (1)
Answer:
Internal linking.

Question 33.
Create a web page using frames for Tourism department showing list of tourist places in Kerala. When a place is selected a detailed description should be available in a separate window.
OR
Create a form that accepts information regarding a student. Fields necessary are name, age, class, sex, roll number, hobbies and date of birth. Use appropriate form controls. [March – 2017] (5)
Answer:
By using target property , we can design like this. Considerthe following five files.
Step 1. Take a notepad and type the following and save it as main.html on C:\

<html>
<head>
<title>
Tourist places in Kerala
</title>
</head>
<body bgcolor=”cyan”>
<h1><u><b><center>Tourist Places in Keralac/ center></b></u></h1 >
<ol>
<li><a href=”tvm.html” target=”f2">Thiruvanathapur- am<7a></li>
<li><a href=”ekm.html” target=”f2">Emakulam</ a></li>
<li><a href=”clt.html” target=”f2">Calicut</ax/li>
</ol>
</body>
</html>

Step 2. Take a notepad and type the following and save it as tvm.html on C:\

<html>
<head>
<title>
Tourist places in Kerala
</title>
</head>
<body bgcolor=”cyan”>
<h1><u><b><center>Thiruvanathapuram</center></b></ux/h1><ul>
<li>Kovalam</li>
<li>Zoo</li>
<li>Padmanabha Swami Temple</li>
</ul>
</body>
</html>

Step 3. Take a notepad and type the following and save it as ekm.html on C:\

<html>
<head>
<title>
Tourist places in Kerala
</title>
</head>
<body bgcolor="cyan”>
<h1><u><b><center>Emakulam</center></b></ u></h1 >
<ul>
<li>Bolghatty Palace</li>
<li>ShipYard</li>
<li>Marine Drive</li>
</ul>
</body>
</html>

Step 4. Take a notepad and type the following and save it as clt.html on C:\

<html>
<head>
<title>
Tourist places in Kerala
</title>
</head>
<body bgcolor=”cyan”>
<h1 ><u><b><center>Calicut</center></b></u></ h1>
<ul>
<li>Kappad Beach</li>
<li>Planetorium</li>
<li>Mananchira</li>
</ul>
</body>
</html>

Step 5. Take a notepad and type the following and ‘ save it as frame.html on C:\

<html>
<head>
<title>
fiame
</title>
<frameset cols=”33% ,*”>
<frame src=”main.htmr>
<frame src=”tvm.htmr name=”f2">
</frameset>
</html>

Step 6. Execute frame.html we will get the output.
OR

<html>
<head>
<title>
form
</trtle>
</head>
<body bgcolor="cyan">
<form method=”post” action=”fa.php”>
<h1 ><u><center><b> Application Form</b></ center></u></h1>
Name &nbsp;&nbsp;
<input type="text” name="txtname”>
<br>
Age &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
Class &nbsp;&nbsp;&nbsp;
<input type=”text” name=”txtclass”>
<br>
Sex &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Male<input type=”radio” name=”optsex” value=”Male”>
Female<input type=”radio” name=”optsex” value=”Female”>
<br>
Roll No
<input type=”text” name=”txtroll” size=”1 ">
<br>
Hobbies
Reading<input type=”checkbox” name=”cbread”>
Singing<input type=”checkbox” name=”cbsing”>
Playing<input type=”checkbox” name=”cbplay”>
<br>
Date of Birth
<input type=”text” name=”txtdob” size=”1 ">
<br><br>
<in put ty pe=”subm it” val ue=”su bmit”>
<input type=”reset” value=”reset”>
</form>
</body>
</html>

Question 34.
Which HTML tag is used to create ordered list? [May – 2017] (1)
Answer:
<ol>

Question 35.
Write an HTML code for a web page to show the following detailsin blue background: [May – 2017] (3)
Components of a Computer
* Hardware
1. RAM
2. ROM
3. Hard Disk

* Software
1. System Program
2. Application program
Answer:

<html>
<head>
<title>
list demo
</title>
</head>
<body bgcolor=”blue”>
Components of a Computer
<ul type=”disc”>
<li>Handware</li>
<ol>
<li>RAM</li>
<li>Rom</li>
<li>Hard Disk</li>
</ol>
<li>Software</li>
<ol>
<li>System Program</li>
<li>Application Program</li>
</ol>
</ul>
</body>
</html>

Question 36.
<FORM> tag contains some other tags to facilitate interaction between user and web page. Write any two control tags and explain their mode of interaction. [May – 2017] (2)
Answer:
<lnput> It is used to create input controls. Its type attribute determines the control type.
Main values of type attribute is given below.
1. Text – To create a text box.
2. Password – To create a password text box.
3. Checkbox – To create a check box.
4. Radio-To create a radio button.
5. Reset – To create a Reset button.
6. Submit-To create a submit button.
7. Button – To create a button

Question 37.
a) Write an HTML code for a web page for your supermarket named “HELPLINE SUPER MARKET’ with the following details and features. [May – 2017]
1) A heading followed by a paragraph of 2 sentences about the district using text formatting tags and attributes.
2) Give postal address of the supermarket with phone number and email id. .
3) Include a marquee that “Hurry up, 50% off for all purchase”. (5)
OR
b) Explain and compare the features of any four scripting languages. (5)
Answer:
a)

<html>
<head>
<title>
HelpLine Super Market
</title>
</head>
<body bgcolor=”cyan”>
<marquee bgcolop=”red” height=”40"> Hurry up, 50% offforall purchase</manquee>
<h1alig.n=”Center”>HELPLINE<br> SUPERMARKET </h1>
<h2 align=”left”><u><i>Trichur</i></u></h2>
<p>Our district is Trichur. It is situated in the central part of Kerala
</p>
Postal Address
<br>
HELPLINE SUPER MARKET,
<br>
Main Road,
Irinjalakuda.
<br>
Phone No.9999900000.
<br>
Email Id: [email protected].
</body>
</html>

b) 1) JavaScript: Java script(developed by Brendan Eich for the Netscape browser) is a platform-independent scripting language. Means It does not require a particular browser. That is it runs on any browser hence it is mostly accepted scripting language.

2) VB Script: VB Script(developed by Microsoft) is a platform-dependent scripting language. Means it requires a particular browser(MS Internet Explorer) to work that is why it is not a widely accepted scripting language.

3) Active Server Pages (ASP)
1) ASP introduced by Microsoft
2) ASP stands for Active Server Page.
3) ASP’s are web pages that are embedded with dynamic contents, such as text.HTML tags and scripts.
4) An ASP file uses .asp extension.
5) In ASP, the script execute in the server and the effect will be sent back to the client computer.
6) Here a real time communication exists between the client and server.
7) ASP applications are very small.
8) The only server used is Microsoft Internet Information Server(IIS), hence it is platform dependant

4) Java Server Pages (JSP)
1) JSP introduced by Sun Micro System
2) JSP stands for Java Server Page.
3) An JSP file uses .jsp extension
4) It is platform independent
5) It uses Apache Tomcat web server
6) JSP binds with Servlets(Servlets are Java codes run in Server to serve-the client requests).

Plus Two Computer Science Chapter Wise Previous Questions Chapter 4 Web Technology

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 4 Web Technology.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 4 Web Technology

Question 1.
“An HTML document requires a structure”. Justify tLIs statement. [MARCH – 2007] (3)
Answer:
HTML page has a well-defined structure. The main sections of the HTML document are given below.
<HTML>-</HTML>

The entire HTML document is bounded with <HTML> and </HTML>
<Head>-</Head> TLIs defines the head section. The head section includes information such as document title, general style definition etc.

<Title>-</Title> TLIs encloses a Title. Title is given in head section. Text given in <TITLE>-</TITLE>will displayed in the Title Bar.

<Body></Body>. Content of the document is written witLIn <BODY> and </BODY>
Eg.

<HTML>
<Head>
<Title>First Page</Title>
</Head>
<Body>
Hello
</BODY>
</HTML>

Question 2
Write the HTML code required to display the following in a web page(use list tags). [MARCH – 2008] (5)
ListBox
A ListBox control displays a list of items from which a user can select one or more items ComboBox
A ComboBox control combines the features of a textbox and a ListBox.
Frame
A frame provides grouping for controls
Answer:

<html>
<head>
<title>
Definition list 
</title>
</head>
<body>
<dl>
<dt>ListBox
<dd>A ListBox control displays a list of items from wLIch a user can select one or more items 
<dt>ComboBox
<dd>A ComboBox control combines the features of a textbox and a ListBox.
<dt>Frame
<dd>A frame provides grouping for controls 
</dl>
</body>
</html>

Question 3.
Gopal wants to set lettertype for a paragraph of text in one of LIs web pages with following properties. Anal font with size 5 and colour red. [MARCH – 2008] (1)
Answer:
<BASEFONT Face=”Arial” size=5 color=”red”>

Question 4.
Suresh is designing a web page. He wants to display an image in the right side of text. Write the HTML code for it. [June 2008] (2)
Answer:
<img SRC=”home.jpg” Align=”Right”>

Question 5.
If you analyse web pages you can see different colors to links, visited links, background etc. Suggest how tLIs can be done in HTML with example. [June 2008] (3)
Answer:
We can use the attributes of <Body>tag
1) Bgcolor-specifies background colorforthe document Body
Eg. <BODY BGCOLOR= “RED”>

2) Background – Sets the image as background for the document body
Eg. <BODY BACKGROUND= “C:/page1 .jpg”>

3) Text- Specifies the color of the text content of the page
Eg. <BODYTEXT= “Blue”>

4) Link- Specifies colour of the hyperlinks that are not visited by the viewer
5) Alink-Specifies the colour of hyperlinks
6) Vlink- Specifies the color of hyperlinks wLIch are already visited by the viewer.
Eg.<BODY ALINK = “Blue” VLINK=”cyan” VLINK=“Yellow”>

Question 6.
What are the two types of hyperlinks available in HTML. [June 2008]
Answer:
The power of HTML lies in the ability to provide hyperlinks. <A> tag is used for this. There are two types of Linking.
1) External Linking. External links are hyperlinks given to another page. By clicking on hypertext we can link or go to other webpages.
<A> Anchor tag is used for External Linking.
<Ahref=“c:\main.htmF>Main</A>

2) Internal Linking- Internal Links are given to a section in the same document.
<HTML>
<HEAD>
<Title> Internal linking</Title>
</HEAD>
<Body>
<P><A name=”Bio”>Biology Group</A><BR>
Subject combinations are Physics, Chemistry, Mathematics and Biology. <P>
<P><A Name= “comp”> computergroup</A> <BR>
Subject combination are Physics, Chemistry, Mathematics and Computer Science. <P>
<P><A name=“Comm”> Commerce Group</A> <BR>
The subject combination are Business studies, Economics, Accountancy and Computer Application
<br><A href=”#Bio”>Go Biology</A>
<br><A href=”#Comp”>Go Com’puter</A>
<br><A href=”#Comm”>Go Commence</A>
</p>
</Body>
</HTML>

Question 7.
The DIR attribute of <HTML> tag is used to indicate ________ [June 2009] (1)
Answer:
Direction

Question 8.
Differentiate container tag and empty tag. [June 2009] (2)
Answer:
Container tag : It has both opening tag and closing
tagEx: <html>,<head>,<body>, ………..
Empty tag : It has only opening tag no closing tag Ex: <br>, <hr>, ………..

Question 9.
WLIch of the following is not a browser program [FEBRUARY – 2009]
a) MOSAIC
b) Windows Explorer (1)
c) Internet Explorer
d) Netscape Navigator
Answer:
Windows Explorer

Question 10.
The following code intends to centralize the image mypic.gif in browser window <IMG src-mypic.gif align =center> however, the desired result is not coming. Can you point out the reason for it and a solution for it ? [FEBRUARY – 2009] (2)
Answer:
The attribute align has no value center. It can take values left, right, top, middle and bottom.
The right code is <IMG src-mypic.gif align =middle>

Question 11
Write the HTML code for creating the following Webpage: [March 2010] (2)
ABC Pvt. Ltd.
HYDERABAD.
1. Health Care
2. Baby Products
a. Toys
b. Dress
3. Men’s Wear
* Casuals
* Formals
Answer:

<HTML>
<HEAD>
<TITLE> ABC Pvt.Ltd</TlTLE>
<HEAD>
<BODY>
<LI> ABC Pvt. Ltd. 
<Br>HYDERABAD
</LI> 
<OL>
<LI>Health Care 
<LI>Baby products
<OLType=”a”>
<L>Toys
<LI>Dress
</OL>
<LI> Mens Wear 
<UL>
<LI>Casuals
<LI>Formals
</UL>
</OL>
</BODY>
</HTML>

Question 12.
Name the software used to view a web page. [June 2010] (1)
Answer:
Web Browser- Microsoft Internet Explorer, Netscape Navigator

Question 13.
List the steps for creating a hyperlink with an example. [June 2010] (2)
Answer:
The power of HTML lies in the ability to provide , hyperlinks. <A> tag is used for tLIs. There are two types of Linking.

1) External Linking. External links are hyperlinks given to another page. By clicking on hyper text we can link or go to other webpages.
<A> Anchor tag is used for External Linking.
<A href= “c:\main. html”>Main</A>

2) Internal Linking- Internal Links are given to a section in the same document.

<HTML>
<HEAD>
<Title> Internal linking</Title>
</HEAD>
<Body>
<P><A name=”Bio”>Biology Group</A><BR>
Subject combinations are Physics, Chemistry, Mathematics and Biology. <P>
<P><A Name= “comp”> computer group</A> <BR>
Subject combination are Physics, Chemistry, Mathematics and Computer Science. <P>
<P><A name=‘Comm> Commence ©oup</A> <BR>
The subject combination are Business studies, Economics, Accountancy and Computer Application
<br><A href=”#Bio”>Go Biology</A>
<br><A href=”#Comp”>Go Computer</A>
<br><A href=”#Comm”>Go Commerce</A>
</p>
</Body>
</HTML>

Question 14.
Suppose you want to place a picture in a web page. WLIch tag is used for tLIs purpose? [March 2011] (2)
Answer:
<img src=”filename”>

Question 15.
HTTPS stands for __________ [March 2016] (1)
Answer:
HyperText Transfer Protocol Secure

Question 16.
How will you distinguish a static webpage from a dynamic webpage? [March 2016] (2)
Answer:

Static web pageDynamic web page
1. Content and layout is fixed1. Not fixed, may change during run time.
2. Never use databases2. It uses databases
3. Directly runs on the browser3. Runs on the server-side application program
4. Not interactive4. Interactive

Question 17
Write HTML code for a webpage of an institution with the following features. It should have a marquee welcoming users, a heading in different fonts and a picture and address of the institution. (3)
Answer:

<html>
<head>
<title>
BVM institute
</title>
</head>
<body bgcolor = “Cyan”>
<MARQUEE height = “100” width = “100 %”
Bgcolor = “red” behavior = “scroll">
BVM HSS welcomes you </MARQUEE>
<H1 > BVM HSS </H1 >
<Fontsize= “12” Face = “Courier New”> Kalparamba </Font>
<img src= “school.jpg” height= “200” width=”200” align =”top”>
</body>
</html>

Question 18.
a) Classify the following scripting language into client-side and server-side: ASP, PHP, JavaScript, VBScript (2)
b) Write anyone’s use of client-side scripting. (1)
Answer:
a) Client side script – Server side script
JavaScript – ASP
VBscript – PHP

b) Client-side scripts are executed by the browser (client)-hence reduces network traffic and workload on the server.

Question 19.
Fill the following table with appropriate points to distinguish between <P> tag and <BR> tag.

<P> tag <BR>tag
1) ……………………. 1. breaks the current line and continues to the next line
2) Container tag
3) Align attributes sets the alignment of the text in the paragraph

Answer:

<P> tag <BR>tag
1. It indicates a new paragraph and instructs the browser to add a blank line before the paragraph 1. breaks the current line and continues to the next line
2) Container tag2. Empty tag
3) Align attributes set the alignment of the text in the paragraph3. It has no aligned attribute

Question 20.
a) Write an HTML code to display a list of hardware and software of a company in the following format:
I) Hardware
1) Cables
i) DTP
ii) Coaxial
iii) Fiberoptic

2) Storage Devices
i) USB
ii) Hard Disk
iii) Tape

II) Software
1) Application Software
i) MS Office
ii) Inventory Management System

2) System Software
i) Compilers
ii) Assemblers (5)
OR
b) Write an HTML code to display a user registration form as shown below:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 4 Web Technology 1
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 4 Web Technology 2
Plus Two Computer Science Chapter Wise Previous Questions Chapter 4 Web Technology 3
Plus Two Computer Science Chapter Wise Previous Questions Chapter 4 Web Technology 4
Plus Two Computer Science Chapter Wise Previous Questions Chapter 4 Web Technology 5

Question 21.
Default port number for HTTPS is _______ (1)
Answer:
The default port number for HTTPS is 443.

(Note that 80 is the default port number for HTTP).

Question 22.
What are the various types of client-side scripting languages? (2)
Answer:
Client scripts – These are scripts executed by the browser(client) hence reduces network traffic and workload on the server.

Javascript and VB Script are the two client-side scripting languages.

Java script(developed by Brendan Eich for the Netscape browser) is a platform-independent scripting language. Means It does not require a particular browser. That is it runs on any browser hence it is mostly accepted scripting language. But VB Script(developed by Microsoft) is a platform-dependent scripting language. This means it requires a particular browser(MS Internet Explorer) to work which is why it is not a widely accepted scripting language.

Question 23.
Develop a web page of an organization with the following features:
a) Has an image as background.
b) Welcomes users with a marquee in attractive fonts.
c) Displays the address of the organization. (3)
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 4 Web Technology 6

Question 24.
Expand the name of the language wLIch is used to develop webpage..’ (1)
Answer:
HTML-Hyper Text Mark up Language

Plus Two Computer Science Chapter Wise Previous Questions Chapter 3 Data Structures and Operations

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 3 Data Structures and Operations.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 3 Data Structures and Operations

Question 1.
Attempting to insert in an already full stack leads to _________ [March – 2016] (1)
Answer:
Overflow

Question 2.
Explain how to push operation is done in a stack. [March – 2016] (2)
Answer:
It is the process of inserting(adding) a new data item I into the stack. If the stack is full and we try to add a new item into the stack makes the stack over flow. The algorithm is given below
Step 1 : If top = N. Then print “OVERFLOW” and return
Step 2 : Set top =top+1
Step 3 : Set Stack[top]= item
Step 4 : stop

Question 3.
Linked lists usually do not have the problem of overflow, Discuss. [March – 2016] (2)
Answer:
1) Linked list is a dynamic data structure
2) Size is not fixed in advance
3) Itcangroworshrinkduringruntime
4) Dynamic memory allocation hence any number of nodes can be added during run time.

Question 4.
Write two advantages of linked list data structure over arrays. [MAY – 2016] (2)
Answer:
The linked list follows the dynamic data structure method. It grows and shrinks as and when the new items are added and removed respectively. Not only that an array requires contiguous memory but a linked list not require contiguous memory rather it uses scattered memory and they linked by pointers. So an element in a linked list consists of data and an address it is called a node. Here address is the link.

Question 5.
Consider the following cases:
1) Paper cups are arranged on a dining table one above the other.
2) Many people are waiting in a row to take tickets fora the cinema.
Identify and compare the data structure that you know in connection with the above-mentioned contexts. [MAY – 2016] (3)
Answer:
1) Stack
2) Queue
A stack is a linear data structure in which items – can be added or removed only at one end called top. But the working principle of the queue is first in first out manner. A new item is added at the rear and removed from the front of a queue.

Question 6.
Queue follows the principle. [MARCH – 2017] (1)
Answer:
FIFO(First In First Out).

Question 7.
How does Stack overflow and underflow occur? [MARCH – 2017] (2)
Answer:
Stack Overflow -: If the stack is full and we try to add (push operation) a new item into the stack makes the stack overflow.
Stack Underflow -: If the stack is empty and we try to delete (pop operation) an item from the stack makes the stack underflow.

Question 8.
Write a procedure to implement traversal operation in a linked list. [MARCH – 2017] (2)
Answer:
Traversing a Linked List
It is the processing of reading all elements in a data structure.
Step 1: Get the address of the first node arid store it in the variable Temp.
Step 2 : Using the address in Temp, get and store the data in Val.
Step 3 : The address of the next node store it in Temp.
Step 4 : If the address of Temp is not null go to step 2, otherwise stop.

Plus Two Computer Science Chapter Wise Assess Questions and Answers

Question 1
Read the following statements:
i) A collection of data processed as a single unit.
ii) All data structures are implemented using arrays.
iii) Stacks and queues are logical concepts and implemented using arrays and linked lists.
iv) Overflow occurs in the case of static data structures.

Which of the above statements are true/ Choose the correct options from the following:
a) Statements (i) and (iii) only
b) Statements (i), (ii) and (iii) only
c) Statements (i), (iii) and (iv) only
d) Statements (i), (ii) and (iv) only
Answer:
c) Statements (i),(iii) and (iv) only

Question 2.
Data structures may be static or dynamic.
a) Give two examples for static data structures.
b) Static data structures may face overflow situation. Why?
c) Linked list is a dynamic data structure. Justify this statement.
Answer:
a) Stack and Queue
b) Static data structures such as stack and queue are implemented by array and has the fixed storage capacity. That is these implementations are static. If the stack is full and we try to add a new item into the stack makes the stack over flow.

c) But linked list follows the dynamic data structure method. It grows and shrinks as and when the new items are added and removed respectively. Not only that an array requires contiguous memory but linked list not require contiguous memory rather it uses scattered memory and they linked by pointers. So an element in a linked list consists of data and an address it is called node. Here address is the link.

Question 3.
Write an algorithm to insert an element into a stack.
Answer:
It is the process of inserting(adding) a new data item I into the stack. If the stack is full and we try to add a new item into the stack makes the stack over flow. Algorithm is given below
Step 1 : If top = N. Then print “OVERFLOW” and return
Step 2 : Set top =top+1
Step 3 : Set Stack[top]= item
Step 4 : stop

Question 4
What is meant by push and pop operations?
Answer:
It is the process of inserting(adding) a newdata item into the stack. If the stack is full and we try to add a new item into the stack makes the stack over flow, a. Pop operation

It is the process of deleting(removing) a data item from the stack. If the stack is empty and we try to delete an item from the stack makes the stack underflow.

Question 5.
Write an algorithm to delete an element form a stack.
Answer:
Step 1 : If top = Null. Then print “UNDERFLOW” and return
Step 2 : Set item=Stack[top]
Step 3 : Set top = top -1
Step 4: stop

Question 6.
Write algorithms to perform insertion and deletion operations in linear queues,
Answer:
a) Insertion operation
It is the process of adding a new item into a queue at the rear end.
If the queue is full and we try to add a new item into the queue makes the queue over flow.
Algorithm is given below
Step 1 : If front = 1 and rear=N orfront =rear+1.
Then print “OVERFLOW’ and return

Step 2 : If front = Null then
Set front = 1 and rear =1
Else if rear = N then set rear = 1
Else
Set rear = rear + 1
End if
Step 3: SetQueue[rear]=item
Step 4 : stop

b) Deletion operation
It is the process of deleting (removing) a data item from the queue from the front. If the queu is empty and we try to delete an item from the queue makes the queue underflow.

Algorithm is given below
Step 1 : If front = Null then print “UNDERFLOW and return
Step 2 : Set item = Queue[front]
Step 3: If front = rear then
Set front = Null and rear =Null
Else if front = N then set front =1
Else
Set front = front +1
End if
Step 4 : stop

Question 7.
How does circular queue overcome the limitation of linear queue?
Answer:
As the name implies logically the shape of the circular queue is a shape of a circle. The linear queue has some limitations such as some occasions the capacity of the linear queue cannot be used fully. The limitation of linearqueue can overcome by circular queue. Circular queue is a queue in which the two end points are connected.

Question 8.
Some of the operations performed on data structures are given below:
i) Insertion
ii) Deletion
iii) Searching
iv) Sorting
a) Which of these operations may face underflow situation?
b) Explain this situation in the context of an appropriate data structure.
Answer:
a) ii. deletion
b) a) Searching: Searching is the process of finding elements in a data structure
b) Inserting: It is the process of adding newdata at particular location is called insertion.
c) Deleting-:lt is the process of removing a particular element from the data structure
d) Sorting-: Arranging elements in a particular order(ascending or descending) is called sorting.

Examples are bubble sort and selection sort.

Question 9
Match the following:

ABC
a. Arrayi. Start1. Insertion and deletion at different ends
b. Stackii. Subscript2. Insertion and deletion at the same end
c. Queueiii. Rear3. Self-referential structure is utilized
d. Linked listiv. Top4. Elements are accessed by specifying its position

Answer:
a) – ii – 4
b) – iv – 2
c) – iii – 1
d) – i – 3

Question 10.
Explain why linked lists do not face an overflow situation as in the case of array-based data structures.
Answer:
The linked list follows the dynamic data structure method. It grows and shrinks as and when the new items are added and removed respectively. Not only that an array requires contiguous memory but a linked list not require contiguous memory rather it uses scattered memory and they linked by pointers. So an element in a linked list consists of data and an address it is called a node. Here address is the link.

Plus Two Computer Science Chapter Wise Previous Questions Chapter 2 Concepts of Object-Oriented Programming

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 2 Concepts of Object-Oriented Programming.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 2 Concepts of Object-Oriented Programming

Question 1.
Compare static and dynamic polymorphism. [MARCH – 2016] (3)
Answer:
There are 2 types of polymorphism they are static and dynamic.
a) Compile time (early binding/static) polymorphism It is the ability of the compiler to relate or bind a function call with the function definition during compilation time itself.

Examples are Function overloading and operator overloading

b) Run time (late binding/dynamic) polymorphism It is the ability of the compiler to relate or bind a function call with the function definition during mn time. It uses the concept of pointers and inheritance.

Question 2.
Differentiate between Data Abstraction and Data Encapsulation. [MARCH – 2017] (3)
Answer:
Data Abstraction: Data abstraction refers to the act of representing essential features without including the background details

Data Encapsulation: The wrapping up of data and functions into a single unit. It is the mechanism that associates the code and the data it manipulates and keep them safe from external interference and misuse.

Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 1 Structures and Pointers.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 1 Structures and Pointers

Question 1.
Represent a structure named student with types and give the advantages of using structure. [March -2016] (3)
Answer:

struct student
{
int regno;
char name [25];
struct
{
short dd;
short mm;
short yy;
} dob;
char sex;
};

the structure is a group of different types of logically related data referenced by a single name.

Question 2.
Structure within a structure is termed as__ [March -2016]
Answer:
Nested structure

Question 3.
Orphaned memory blocks are undesirable. How can they be avoided [March -2016]
OR
Discuss problems created by memory leaks. (2)
Answer:
Proper use of delete operator is heeded
0R
1) It causes orphaned memory blocks
2) wastage of memory
3) insufficient memory
4) due to this sometimes system may be hanged

Question 4.
Explain the use of for loop with an appropriate example. [March -2016] (3)
Answer:
For loop is used to execute a statement more than once.
Refer 5 Mark Question 2

Question 5.
a) How will you free the allocated memory? [MAY-2016] (1)
b) Define a structure called time to group the hours, minutes and seconds. Also write a statement that declares two variables current-time and next-time which are of type struct time. (2)
Answer:
a) delete operator is used to free the allocated memory.

b)

struct time
{
int hours;
int minutes;
int seconds;
};
time current, next;

Question 6.
A program is implemented to find the area of a circle and area of a rectangle with two functions having same name but with different signature. [MAY-2016]
a) Name the concept (1)
b) Explain this concept by writing the above program. (2)
Answer:
a) Polymorphism
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 1
Here the function names are same but the return type and number of parameters are different hence distinguish the functions.

Question 7.
a) Write a C++ program to store and print information (name, roll and marks) of a student using structure. [MAY-2016] (3)
OR
b) Write a program in C++ to input the total marks obtained by a group of students in a class and dis-play them in descending order using pointer. (3)
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 2
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 3
OR
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 4

Question 8.
Compare the aspects of arrays and structures. [March – 2017] (3)
Answer:
Array-: An array is a collection of elements with same data fypeOr with the same name we can store many elements, the first or second or third etc can be distinguished by using the index(subscript). The first element’s index is 0, the second elements index is 1, and so on.

To store 100 numbers the array declaration is as follows

int n[100]; By this we store 100 numbers. The index of the first element is O and the index of last element is 99.

Structure -: But a Structure is a group of different types of Ipgically related data referenced by a single name.
Eg. The collection of details of a student that may contain various data with different data types.

Eg.

struct student
{
int adm_no;
char name[40];
float weight;
};

OR

StructureArray
Differences
1. It is a user-defined data type
Predefined data type
2. It is a collection of different types of logically related data under one name.Collection of data elements of same data type having a common name.
3. Elements referenced using dot operator(.)Elements reference using its subscripts (position value)
4. When an element of a structure becomes another structure nested structure and complex structures are formed.When an element of another becomes another array, multidimensional arrays are formed.
5. Structure contains array as its elementsArray of structure can be formed.

Question 9.
Run time allocation of memory is triggered by the operator. [March – 2017] (1)
Answer:
new

Question 10.
Represent the names of 12 months as an array of strings. [March – 2017]
OR
A structure can contain another structure. Discuss. (2)
Answer:
char month(1 2)[]={ “Jan”,”Feb”,”Mar”, “Apr”,May”,“Jun”,”July”,”Aug”, “Sep”,Oct”,“Nov”,”Dec”};
OR
Yes It is possible. This is called nested structure.
Eg.

struct date
{
short day,month,year’
};
struct student
{
inl reg_no;
char name[40];
date dob;
};

Plus Two Computer Science Chapter Wise Practice Questions Chapter 1 Structures and Pointers

Question 1.
Define a structure to represent the details of telephone subscribers which include name of the subscriber and telephone number. Write a menu driven program to store the details of some subscribers with options for searching the name for a given number, and the number for a given name.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 5
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 6
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 7
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 8

Question 2.
Define a structure to represent the details of customers in a bank. The details include account number, name, date of opening the account and balance amount. Write a menu driven program to input the details of a customer and provide options to deposit, withdraw and view the details. During deposit and withdrawal, proper update is to be made in the balance amount. A minimum balance of Rs. 1000/- is a must in the account.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 9
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 10
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 11

Question 3.
Write a program to input the TE scores obtained by a group of students in Computer Science and display them in the descending order using pointers.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 12
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 13

Question 4.
Write a program to input a string and check whether it is palindrome or not using character pointer.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 14

Question 5.
Write a program to input the names of students in a class using pointers and create a roll list in which the names are listed in alphabetical order with roll number starting from 1.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 15
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 16

Question 6.
Define a structure student with the details register number, name and CE marks of six subjects. Using a structure pointer, input the details of a student and display register number, name and total CE score.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 17
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 18
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 19

Plus Two Computer Science Assess Question and Answers

Question 1.
Compare array arid structure in C++.
Answer:

StructureArray
Differences
1. It is a user defined data type
2. It is a collection of different types of logically related data under one name.
3. Elements referenced using dot operator(.)
4.When an element of a structure becomes another structure nested structure and complex structures are formed.
5. Structure contains array as its elements
Predefined data type
Collection of data elements of same data type having a common name.
Elements reference using its subscripts (position value).
When an element of another becomes another array, multidimensional arrays are formed.
Array of structure can be formed.

Question 2.
Identify the errors in the following structure definition and write the reason for each:

struct
{
int roll, age;
float fee= 1000:
};

Answer:
Errors
1) No name for the structure.
The correct structure is as follows

struct student
{
short roll.age:;
float fee=1000;
}

Question 3.
Read the following structure definition and answer the following questions:

Struct Book
{
int book_no;
char bk_name [20];
struct
{
short dd;
short mm;
short yy;
} dI_of_purchase;
float price;
};

a) Write a C++ statement to declare a variable to refer to the details of a book. What is the memory requirement of this variable? Justify your answer.
b) Write a C++ statement to initialize this variable with the details of your Computer Science text book.
c) Write C++ statement (s) to display the details of the book.
d) The missing of structure tag in the inner structure does not cause any error. State whether this is true or false. Give reason.
Answer:
a) Book b;
The memory requirements are as follows

variable Memory Size
book_no 4
bk_name 20
dt_of_purchase 2+2+2=6
price 4

A total of 34 Bytes allocated to the variable b.

b) book b={101 .”Computer Science”,{22,9,2015},127};

Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 20
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 21

d) This is true. There is no need to mention the structure tag because it is declared inside the structure.

Question 4.
“Structure is a user-defined data type”. Justify this statement with the help of an example.
Answer:
Yes it is true. A user can give define according to his needs.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 22

Question 5.
Read the following statements:
i) While defining a structure in C++, tag may be omitted.
ii) The data contained in a structure variable can be copied into another variable only if both of them are declared using the same structure tag.
iii) Elements of a structure is referenced by stmcture_name. element
iv) A structure can contain another structure.
Now, Choose the correct option from the following:
a) Statements (i) and (ii) are true
b) Statements (ii) and (iv) are true
c) Statements (i), (ii) and (iv) are true
d) Statements (i) and (iii) are true jtyg
Answer:
d) Statements (i) and (iii) are true.

Question 6.
Read the following C++ statements:
int * p, a=5
p=&a;
a) What is the speciality of the variable p?
b) What will be the content of p afterthe execution of the second statement?
c) Howdo the expressions *p+1 and* (p+1) differ?
Answer:
a) p is special variable and it is called a pointer.
b) p contains the address of the variable a

Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 23

Here p+1 returns (address of the variable a) +4(4 is the size of int data type in Geany C++). *(p+1) returns the content of this next address location.

Question 7.
Identify the errors in the following C++ code segment and give the reason for each.

int p, *q a=5;
float b2;
p=&a;
cout<<p<<*p<<*a;
if (p<q)coLit<<p;
cout<<cp *a;

Answer:
Following are the errors
1) Here q is an integer pointer it can not store the address of float variable b.
2) Cannot print *a.
3) The pointers p and q are different data types so cannot use relational operator.

The correct code is as given below.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 24

Question 8.
While writing a program, the concept of dynamic memory allocation is applied. But the program does not contain a statement with delete operator and it creates a problem. Explain the problem.
Answer:
If the memory allocated using new operator is not de allocated using delete, that memory is left unused and not released forfurtherallocation. Such memory blocks are called orphaned memory. On each execution the amount of orphaned block is increased. This situation is called memory leak.

Question 9.
Read the C++ statements given below and answer the following questions: •
int ar[] = {34,12, 25,56, 38};
int *p = ar;
a) What will be the content of p?
b) What is the output of the expression: *p + *(ar+2)?
c) The statement ar++; is invalid. Why? How does it differ from p++;?
Answer:
a) 34
b) *p=34 and *(ar+2)=25
then *p+*(ar+2)=34+25=59.
c) ar++ is invalid but p++ valid, p is the pointer, pointer arithmetic is allowed.

Question 10.
Explain the working of the following code segment and predict the output:
char *str = “Tobacco Kills”;
for (int i=0; str [i] !=’\0’; i++)
if (i>8)
* (str +i) = toupper (*(str+i);
cout«str;
Answer:
The output is “Tobacco KILLS”. The toupperO function convert the characters into upper case from ninth characteronwards.

Question 11.
Observe the following C++ statements:
int ar [ ] = {14, 29, 32,63, 30};
One of following expressions cannot be used to access the element 32. Which is that?
a) ar [2] b)ar[*ar%3] c)*ar+2 d)*(ar+2)
Answer:
c) *ar+2.
*ar returns 14 and *ar+2 gives 14+2=16.

Question 12.
Explain the operations performed by the operators new and delete with the help of examples.
Answer:
new operator is used to allocate memory dynamically

Syntax:
pointer_variable =newdata_type;
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 25

Question 13.
What is meant by memory leak? What are the reasons for it? How can we avoid such a situation?
Answer:
If the memory allocated using new operator is not de allocated using delete , that memory is left unused and not released for further allocation. Such memory blocks are called orphaned memory. On each execution the amount of orphaned block is increased. This situation is called memory leak. Use delete operator to avoid this.

Question 14.
Compare the following two statements, int a=5;
int*a=newint(5);
Answer:
int a=5; This means ‘a’ is an integer variable that is initialized with the integer value 5.
int *a=new int(5). Here ‘a’ is a pointer variable and it allocates memory dynamically and stores a value 5.

Question 15.
Read the structure definition given below and answer the following questions:

struct sample
{
int num;
char *str;
} *sptr

a) Write C++ statements to dynamically allocate a location for sample type data and store its address in sptr.
b) Write C++ statements to input data into the location pointed to by sptr.
c) Modify this structure into a self-referential structure.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 1 Structures and Pointers 26

Plus Two Business Studies Notes Chapter 13 Entrepreneurial Development

Kerala State Board New Syllabus Plus Two Business Studies Notes Chapter 13 Entrepreneurial Development.

Kerala Plus Two Business Studies Notes Chapter 13 Entrepreneurial Development

Meaning

All activities undertaken by an entrepreneur to bring a business unit into existence are collectively known as entrepreneurship. An entrepreneur is a person who undertakes the risk of a new enterprise. The business unit is called an enterprise.

Characteristics of Entrepreneurship

  • It is a systematic and purposeful activity.
  • The object of entrepreneurship is a lawful business.
  • Entrepreneurship is a creative response to the environment and the ability to exploit an economic opportunity.
  • It is concerned with employing, managing, and developing the factors of production.
  • Entrepreneurship involves risk. Profit is the reward of risk taking.

Relationship between Entrepreneurship and Management

Entrepreneurship:

  • The main motive of an entrepreneur is to start a venture by setting up an enterprise.
  • An entrepreneur is the owner of the enterprise.
  • An entrepreneur assumes all risks and uncertainty.
  • An entrepreneur gets profit.
  • An Entrepreneur acts as an innovator.
  • Entrepreneur is self motivated

Management:

  • The main motive of a manager is to render his services in an enterprise already set up by someone.
  • A manager is the servant in the enterprise.
  • A manager does not bear any risk involved in the enterprise.
  • A manager gets salary.
  • Manager executes the plans prepared by the entrepreneur.
  • Manager is motivated by entrepreneur.

Functions (Role) of Entrepreneurs in Relation to Economic Development

1) Contribution to GDP: Entrepreneurs explore and exploit opportunities, encourage effective resource mobilisation of capital and skill, bring in new products and services and develops markets for growth of the economy. In this way, they help increasing gross national product (GDP) as well as per capita income of the people in a country.

2) Capital Formation: Entrepreneurs promote capital formation by mobilising the idle savings of public. They employ these resources for setting up an enterprise.

3) Generation of Employment: With the setting up of more andmore business units by entrepreneurs, a large number of employment opportunities are created.

4) Promotes Balanced Regional Development: Entrepreneurs help to remove regional disparities through setting up of industries in less developed and backward areas.

5) Reduces Concentration of Economic Power: A large number of entrepreneurs needs to be developed, which will help reduce the concentration of economic power amongst the population.

6) Improvement in the Standard of Living: Entrepreneurs enables the people to avail better quality goods at lower prices which results in the improvement of their standard of living.

7) Promotes Export Trade: Entrepreneurs help in promoting a country’s export-trade, which is an important ingredient of economic development.

8) Facilitates Overall Development: The entrepreneurs multiply their entrepreneurial activities, thus creating an environment of enthusiasm and invite others for overall development of the area.

Role of Entrepreneurs in Relation to their Enterprise

  • Perceiving market opportunities
  • Gaining command over scarce resources.
  • Marketing of the products.
  • Face the competition
  • Dealing with public bureaucracy (concession, licenses and taxes)
  • Managing the human relation within the firm.
  • Managing customer and supplier relations.
  • Managing finance.
  • Acquiring and overseeing assembly of the factory.
  • Improve the quality of the products

Process of Setting up a Business

Plus Two Business Studies Notes Chapter 13 Entrepreneurial Development 1

Entrepreneurial Competencies

  • He has the ability to take or initiate the first move towards setting up of an enterprise.
  • He is always on the lookout or searching for opportunity and is ready to exploit it in the best interest of the enterprise.
  • Successful entrepreneur finds ways to do things faster with fewer resources at tower costs.
  • He belives in systematic planning and its proper execution to reach goals.
  • An entrepreneur is never disheartened by failures. He follows try-try again for overcoming the obstacles.
  • An entrepreneur is always in search of new ideas from various sources.
  • He has the ability to understand and solve business problems.
  • He must be optimistic

Qualities of an entrepreneur can be summarised as follows

Plus Two Business Studies Notes Chapter 13 Entrepreneurial Development 2

Entrepreneurial Motivation

The entrepreneurial motivation may be defined as the process that activates and motivates the entrepreneur to exert higher level of efforts for the achievement of organisational goals.

1) Need for Achievement (N-Ach.): Need for achievement implies a desire to accomplish something difficult. They are intrinsically motivated. They prefer work that has a moderate chance for success (about 50/50) and tend to avoid situations that are low-risk and those that are high-risk.

2) Need for Power (N-Pow): Need for Power is the concern for influencing people or the behaviour of others for moving in the chosen direction and attaining the envisioned objectives.

3) Need for Affiliation (N-Aff.): The need for affiliation is characterised by a desire to belong, an enjoyment of teamwork, a concern about interpersonal relationships, etc.

4) Need for Autonomy (N-Aut.): The need for autonomy is a desire for independence and being responsible and accountable to oneself rather than some external authority for performance.

Entrepreneurial Values and Attitudes

Entrepreneurial values and attitudes refer to the behavioural choices of individuals make for success in entrepreneurship.

Plus Two Business Studies Notes Chapter 12 Consumer Protection

Kerala State Board New Syllabus Plus Two Business Studies Notes Chapter 12 Consumer Protection.

Kerala Plus Two Business Studies Notes Chapter 12 Consumer Protection

Meaning

There is a need for providing adequate protection to consumers against unscrupulous, exploitative and unfair trade practices of the sellers.

Importance of Consumer Protection

1) From Consumers’ point of view:

  • It is necessary to educate the customers about their rights.
  • Consumers need to be organised in the form of consumer organisations that would take care of their interests.
  • To protect consumers from unscrupulous, exploitative, and unfair trade practices.

2) From the Point of View of Business:

  • Business firms should aim at long-term profit maximization through customer satisfaction.
  • Business organisations use resources that belong to society.
  • A business has social responsibilities towards various interest groups.
  • It is the moral duty of any business to take care of consumer’s interest and avoid any form of their exploitation.
  • A business engaging in any form of exploitative trade practices would invite government intervention or action.

Legal Protection to Consumers

The Indian legal framework consists of a number of regulations which provide protection to consumers.
They are:

  • The Consumer Protection Act 1986
  • The Indian Contract Act 1812
  • The Sale of Goods Act 1930
  • The essential commodities Act 1955
  • The Agricultural Produce (Grading & Marketing) Act 1937
  • The Prevention of Food Adulteration Act 1954
  • The Standards of Weights and Measures Act 1976
  • The Trade Marks Act of 1999
  • The Competition Act 2002
  • The Bureau of Indian Standards Act 1986.

The Consumer Protection Act, 1986 (CPA): The Consumer Protection Act was passed in 1986 and it came into force from 1 July 1987. The main objectives of the Act are to provide better and all-round protection to consumers and effective safeguards against different types of exploitation. It also makes provisions for simple, speedy, and inexpensive machinery for redressal of consumers’ grievances.

Features of Consumer Protection Act 1986:

  • It applies to all goods and services except the goods exempted by the government.
  • Public, private and the co-operative sectors are covered by the Act.
  • It safeguards consumers against different types of exploitation.
  • It covers important consumer rights.

Consumer Rights

  • Right to Safety: The consumer has a right to be protected against goods and services which are hazardous to life and health.
  • Right to be Informed: The consumer has a right to have complete information about the product he intends to buy including its ingredients, date of manufacture, price, quantity, directions for use, etc.
  • Right to Choose: The consumer has the freedom to choose from a variety of products at competitive prices.
  • Right to be Heard: The consumer has a right to file a complaint and to be heard in case of dissatisfaction with goods or services.
  • Right to seek Redressal: The consumer has a right to get relief in case the product or service falls short of his expectations.
  • Right to Consumer Education: The consumer must be educated about the rights and remedies available under different laws.

Consumer’s Responsibilities

  • Be aware of various goods and services available in the market.
  • Buy only standardised goods as they provide quality assurance.
  • Learn about the risks associated with products and services, follow the manufacturer’s instructions and use the products safely.
  • Read labels carefully so as to have information about prices, net weight, manufacturing and expiry dates, etc.
  • Choose only from legal goods and services.
  • Ask for a cash memo on purchase of goods or services.
  • File a complaint in an appropriate consumer forum in case of poor quality of goods or services.
  • Form consumer societies which would play an active part in educating consumers.

Ways and Means of Consumer Protection

  • Self Regulation by Business: Many firms have set up their customer service and grievance cells to redress the problems and grievances of their consumers.
  • Business Associations: The Associations of trade, commerce and business like Federation of Indian Chambers of Commerce of India (FICCl) and Confederation of Indian Industries (Cl I) have laid down their code of conduct for their members in their dealings with the customers.
  • Consumer Awareness: A consumer, who is well informed about his rights, responsibilities and the reliefs available to him, would be in a position to raise his voice against any unfair trade practices or unscrupulous exploitation.
  • Consumer Organisations: Consumer organisations play an important role in educating consumers about their rights and providing protection to them.
  • Government: The government can protect the interests of the consumers by enacting various legislations.

Redressal Agencies under the Consumer Protection Act 1986

For the redressal of consumer grievances, the Consumer Protection Act provides for setting up of a three-tier enforcement machinery at the District, State, and the National levels. They are:

  1. District Forum
  2. State Commission
  3. National Commission

1) District Forum: This is established in each district by the state government. The District Forum consists of a president and two other members. A complaint can be made to the appropriate District Forum when the value of the goods or services and compensation claimed does not exceed Rs. 20 lakh. In case the aggrieved party is not satisfied with the order of the District Forum, he can appeal before the State Commission within 30 days of the passing of the order.

2) State Commission: It is established by the state government. The State Commission consists of a president and not less than two other members. A complaint can be filed before the State Commission where the value of goods or services and the compensation claimed exceeds Rs. 20 lakh but does not exceed Rs. 1 crore.ln case the aggrieved party is not satisfied with the order of the State Commission he can appeal to the National Commission within 30 days of passing of the order.

3) National Commission: The National Commission was constituted by the central government. The National Commission consists of a president and at least four other members. It is the apex body in the three-tier judicial machinery set up by the government for the redressal of consumer grievances. All complaints pertaining to those goods or services and compensation whose value is more than Rs. 1 crore can be filed directly before the National Commission. An appeal can be filed against the order of the National Commission to the Supreme Court within 30 days from the date of order passed.

Relief Available to Consumers (Remedies)

  • To remove the defect in goods or deficiency in service.
  • To replace the defective product with a new one, free from any defect.
  • To refund the price paid for the product.
  • To pay a reasonable amount of compensation for any loss or injury suffered by the consumer.
  • To discontinue the unfair/restrictive trade practice.
  • Not to offer hazardous goods for sale.
  • To withdraw the hazardous goods from sale.
  • To issue corrective advertisement to neutralise the effect of a misleading advertisement.

Role of Consumer Organisations and Non-governmental Organizations (NGOs.)

  • Educating the general public about consumer rights by organising training programmes, seminars, and workshops.
  • Publishing periodicals and other publications.
  • Collecting various samples of different goods and testing their quality.
  • Encouraging consumers to protest against exploitative and unfair trade practices of sellers.
  • Providing legal assistance to consumers by way of providing aid, legal advice, etc.
  • Filing complaints inappropriate consumer courts on behalf of the consumers.
  • Encouraging consumers to boycott defective goods.
  • Encouraging consumers to purchase consumer-friendly products.
  • Taking an initiative in filing cases in consumer courts in the interest of the general public.

Some of the important consumer organisations and NGOs engaged in consumer protection are:

  • Consumer Co-ordination Council, Delhi.
  • Voluntary Organisation in Interest of Consumer Education (VOICE).
  • Common Cause, Delhi.
  • Consumer Protection Council, Ahmedabad.
  • Consumer Guidance Society of India, Mumbai.
  • Consumer’s Association, Kolkatta, etc.

Consumer

Under the Consumer Protection Act, a consumer is defined as:

  1. Any person who buys any goods for consideration.
  2. Any person who hires or avails of any service, for a consideration.

Who can File a Complaint?: Complaint before the appropriate consumer forum can be made by

  • Any consumer.
  • The Central Government or any State Government.
  • One or more consumers, on behalf of numerous consumers having the same interest.
  • A legal heir or representative of a deceased consumer.

Plus Two Business Studies Notes Chapter 11 Marketing Management

Kerala State Board New Syllabus Plus Two Business Studies Notes Chapter 11 Marketing Management.

Kerala Plus Two Business Studies Notes Chapter 11 Marketing Management

Market

It refers to a place where the buyers and sellers meet each other for sale and purchase of the commodity.

Marketing

Marketing may be defined as all activities that are facilitating the movement of goods and services from producer to the ultimate consumer.

Features of Marketing

  • Needs and Wants: Marketing focuses on satisfaction of the needs and wants of consumers.
  • Creating a Market Offering: It refers to providing complete information about the product and services like name, type, price, size, etc.
  • Customer Value: A buyer analyses the cost and the satisfaction that a product provides before buying it. The seller should manufacture the product keeping in view this tendency of the customer.
  • Exchange Mechanism: The process of marketing involves exchange of products and services. Exchange is the essence of marketing.

Marketer

Any person, who takes more active role in the exchange process is called marketer.

Marketing Management

It refers to planning, organising, directing and controlling of the activities which facilitate exchange of goods and services between producers and consumers.

Differences between Marketing and Selling

Marketing:

  1. Marketing is a wider term consisting of number of activities.
  2. It is concerned with product planning and development.
  3. It focuses on maximum satisfaction of the customer.
  4. It aims at profits through consumer satisfaction.
  5. Marketing begins before actual production.
  6. It is customer oriented. Customer is important.
  7. The principle of “let the seller beware” is followed.

Selling:

  1. It is a narrow concept.
  2. It is concerned with sale of goods already produced.
  3. It focuses on the maximum satisfaction of the sellers through the exchange of products.
  4. It aims at maximum profit through maximisation of sales.
  5. Selling takes place after the production.
  6. It is product oriented. Product is more important.
  7. The principle of “let the buyer” beware is followed.

Marketing Concepts

1) The Production Concept: This concept believed that profits could be maximised by producing at large scale, thereby reducing the cost of production. Here greater emphasis was given on improving the production and distribution.
2) The Product Concept: According to this concept quality of the product is more important than quantity. Product improvement became the key to profit maximisation of a firm, under the concept of product orientation.
3) The Selling Concept: This concept focuses on the sale of products through aggressive selling and promotional techniques to persuade the buyers to buy the products,
4) The Marketing Concept: Marketing concept implies that focus on satisfaction of customer’s needs is the key to the success of any organisation in the market. Customer’s satisfaction becomes the focal point of all decision making in the organisation.
5) The Societal Marketing Concept: This concept stresses not only the customer satisfaction but also gives importance to the welfare of the society.

Functions of Marketing

1) Marketing Research: Marketing Research is a process of collecting and analysing market information to identify the needs and wants of the customers.
2) Marketing Planning: Another function of marketing is to develop appropriate marketing plans so that the marketing objectives of the organisation can be achieved.
3) Product Designing and Development: The products are designed and developed according to the needs and wants of the consumers. It requires decision making on various aspects such as the product to be manufactured, its packing, selling price, quality of the product, etc.
4) Standardisation and Grading: Standardisation refers to producing goods of predetermined specifications. Grading is the process of classification of products info different groups, on the basis of quality, size, etc.
5) Packaging and Labelling: Packaging refers to designing and developing the package forthe products. Packaging gives protection to goods. Also it attracts the consumers to buy the product. Labelling refers to designing and developing the label to be put on the package.
6) Branding: A brand is a name, term, sign, symbol, design or some combination of them, used to identify the products of one seller and to differentiate them from those of the competitors.
7) Customer Support Services: An important function of the marketing management is to develop customer support services such as after sales services, handling customer complaints, etc. which provides maximum satisfaction to the customers.
8) Pricing: Price of a product refers to the amount of money which customers have to pay to obtain a product. Price is an important factor affecting the success or failure of a product in the market. Price is fixed after taking into account the cost of production, desired profit, competitor’s price, govt, policy, etc.
9) Promotion: Promotion of products and services involves informing the customers about the firm’s product, its features, etc. and persuading them to purchase these products. It includes Advertising, Personal Selling, Publicity and Sales Promotion.
10) Physical Distribution: It includes decision regarding channels of distribution and physical movement of the product from the production centre to the consumption centre.
11) Transportation: Transportation involves physical movement of goods from one place to another. It removes the hindrance of place and creates time utility.
12) Storage or Warehousing: In order to maintain smooth flow of products in the market, there is a need for proper storage of the products. It stabilizes the prices of products and keep the product without damage until they are sold.

Role/Objectives of Marketing

1) Role in a Firm: Modern marketing emphasises that customer satisfaction is the key to the survival and growth of an organization. A satisfied customer is the most valuable asset of any firm. So product must be designed according to the needs and wants of the consumers, ensure fair distribution and determine an appropriate pricing strategy.

2) Role in the Economy: Marketing plays a significant role in the economic development of a nation. Marketing helps to increase the standard of living of the people by providing quality goods at reasonable prices. Marketing accelerates the economic activity leading to higher incomes, more consumption and increased savings and investment.

Marketing Mix

It refers to the combination of four basic marketing tools (Product, Price, Place and Promotion) that a firm uses to pursue its marketing objectives in a target market.

Plus Two Business Studies Notes Chapter 11 Marketing Management 1

Elements/4 P’s of Marketing Mix

1) Product: Product means goods or services or ‘anything of value’, which is offered to the market for sale. The important product decisions include deciding about the features, quality, packaging, labelling and branding of the products.

2) Price: Price is the amount of money paid by the customers to pay to obtain the product. In most of the products, price affects the demand of the products. Desired profits, cost of production, competition, demands, etc. must be considered before fixing the price of a product.

3) Place: Place or Physical Distribution includes activities that make firm’s products available to the target customers. Important decision areas in this respect include selection of dealers, storage, warehousing and transportation of goods from the place of production to the place of consumption.

4) Promotion: Promotion includes activities that communicate availability, features, merits, etc. of the products to the target customers and persuade them to buy it. It includes advertising, personal selling, sales promotion and publicity to promote the sale of products.

Product

Product may be defined as anything that can be offered to a market to satisfy a want or need. Products may broadly be classified into two categories.

  1. Consumers products
  2. Industrial products

Consumers’ products

Products, which are purchased by the ultimate consumers for satisfying their personal needs and wants are referred to as consumer products.
Consumer products are classified as
a) Shopping efforts involved
b) Durability of products

a) Shopping Efforts Involved: On the basis of the time and effort, buyers are willing to spend in the purchase of a product, we can classify the consumer product into three.
1) Convenience Products: Those consumer products, which are purchased frequently, immediately and with least time and efforts are referred to as convenience goods, e.g. ice creams, medicines, newspaper, stationery items, toothpaste, etc.

2) Shopping Products: Shopping products are those consumer goods, which buyers devote considerable time, to compare the quality, price, style, suitability, etc., at several stores, before making final purchase, e.g. clothes, shoes, jewellery, furniture, etc.

3) Speciality Products: Speciality products are those consumer goods which have certain special features because of which people make special efforts in their purchase. The buyers are willing to spend a lot of time and efforts on the purchase of such products. The demand for these goods is inelastic.

b) Durability of Products: On the basis of their durability, the consumer products have been classified into three. They are:

1) Durable Products: Durable goods are used for a long period. Such goods generally require more personal selling efforts, have high profit margin, and require aftersales service.
e g. refrigerator, car, washing machine, etc.

2) Non-durable Products: The consumer products which are normally consumed in one or few uses are called non-durable products, e.g. toothpaste, detergents, bathing soap and stationery products, etc.

3) Services: Services are essentially intangible activities which provide want or need satisfaction, e.g. Medical treatment, postal, banking and | insurance services, etc.

Industrial Products

Industrial products are those products, which are used as inputs in producing other products. The examples of such products are raw materials, engines, lubricants, machines, tools, etc.

Types of industrial products:

  1. Materials and Parts: These include goods that enter the manufacture’s products completely.
  2. Capital Items: These goods are used in the production of finished goods.
  3. Supplies and Business Services: These are short lasting goods and services that facilitate developing or managing the finished product.

Branding

The process of giving a name or a sign or a symbol, etc. to a product is called branding. Terms related with branding

  • Brand: A brand is a name, term, sign, symbol, design or some combination of them, used to identify the products of one seller or group of sellers and to differentiate them from those of the competitors.
  • Brand Name: That part of a brand, which can be vocalized i.e., can be spoken is called a brand name, e.g. Asian Paints, Maggie, Lifebuoy, Dunlop, etc.
  • Brand Mark: A brand mark is that part of a brand which can be recognized but cannot be vocalized, i.e., non-utterable. It appears in the form of a symbol, design or distinct colour scheme. For example:‘Girl’of Amul.
  • Trade Mark: A brand or part of a brand that is given legal protection against its use by other firms is called trade mark. The firm which got its brand registered with the government, gets the exclusive right for its use.-/*

Advantages of Branding

Advantages to the Firm:

  • Branding helps a firm in distinguishing its product from that of its competitors.
  • It helps in advertising and display Programmes.
  • Branding enables a firm to charge competitive price for its products than that charged by its competitors.
  • It helps in Introduction of new product in the market.

Advantages to Customers:

  • Branding helps the customers in identifying the products.
  • Branding ensures a particular level of quality of the product.
  • Some brands become status symbols because of their quality. It creates a feeling of proud and satisfaction in the consumers.

Qualities of a Good Brand Name

  • The brand name should be short, easy to pronounce, spell, recognise and remember.
  • A brand should suggest the product’s benefits and qualities.
  • A brand name should be distinctive.
  • Brand name should be adaptable to packing or labelling requirements, to different advertising media and to different languages.
  • The brand name should be sufficiently versatile to accommodate new products.
  • It should be capable of being registered and protected legally.

Packaging

Packaging refers to the act of designing and producing the container or wrapper of a product. Packaging plays a very important role in the marketing success or failure of products.

Levels of Packaging:

  • Primary Package: It refers to the product’s immediate container, e.g. toothpaste tube, match box, etc.
  • Secondary, Packaging: It refers to additional layers of protection that are kept till the product is ready for use.
  • Transportation Packaging: It refers to further packaging components necessary for storage, identification or transportation.

Functions of Packaging:

  • Packaging helps in identification of the products.
  • Packaging protects the product from spoilage, breakage, leakage, etc.
  • It facilitates easy transfer of goods to customers.
  • Packaging provides convenience in the storage of the product.
  • It attracts the consumers to purchase the product.

Labelling

Labelling means putting identification marks on the package. It is a simple tag attached to the product.

Functions of Labelling:

  • It describes the product, its usage, cautions in use, etc. and specify its contents.
  • It helps in identifying the product.
  • It helps grading the products into different categories.
  • It helps in promotion of products.
  • It provides information required by law.

Pricing

Price may be defined as the amount of money paid by a buyer in consideration of the purchase of a product or a service.

Factors Affecting Price Determination:
1) Product Cost: One of the most important factors affecting price of a product or service is its cost of production and distribution. Fixed Costs, Variable Costs and Semi- Variable Costs are to be considered for determining the price.

2) Demand: The price of a product is affected by the elasticity of demand of the product. If the demand of a product is inelastic, the firm is in a better position to fix higher prices.

3) Competition: Competitors’ prices and their anticipated reactions must be considered before fixing the price of a product. In case of high competition, it is desirable to keep price low.

4) Government and Legal Regulations: In order to protect the interest of public against unfair practices, prices of some essential products are regulated by the government under the Essential Commodities Act., e.g. Medicines.

5) Pricing Objectives: Another important factor affecting the fixation of price of a product is pricing objectives, e.g. maximisation of profit, market share, etc.

Place (Physical Distribution)

The third element of marketing mix is physical distribution of products and services. In order to ensure availability of products at the right place, two factors require consideration.

  1. Channels of distribution
  2. Physical distribution

Channels of Distribution

A channel of distribution refers to the pathway used by the manufacturer for transfer of the ownership of goods and its physical transfer to the consumers.

Types of Channels:

  1. Direct channel (Zero level): Producer → Consumer
  2. One level channel: Producer → Retailer → Consumer
  3. Two level channel: Producer → Wholesaler → Retailer → Consumer
  4. Three level channel: Producer → Agent → Wholesaler → Retailer → Consumer

Physical Distribution

Physical distribution covers all the activities required to physically move goods from manufacturers to the customers.

Components of Physical Distribution

  • Order Processing
  • Transportation
  • Warehousing
  • Inventory Control

Promotion Mix

Promotion mix refers to combination of promotional tools such as Advertising, Personal Selling, Sales Promotion, and Publicity used by an organisation to achieve its communication objectives.

Plus Two Business Studies Notes Chapter 11 Marketing Management 2

Advertising

Advertising may be defined as “any paid form of non-personal presentation and promotion of ideas, goods or service of an identified sponsor”.

Merits of Advertising:
1. Advantages to Manufacturers and Traders

  • Advertising helps in introducing new products.
  • It stimulates the consumers to purchase the new products.
  • Advertisement helps to increase the sales of new and existing products.
  • It helps to increase the goodwill of the firm.
  • It helps to face the competition in the market.
  • It increases profit of the firm through large sales.

2. Advantages to Consumers:

  • It helps the consumers to know about the various products and their prices.
  • Consumers can purchase the better products easily.
  • It helps in maintaining high standard of living.
  • It educates the consumers about the various uses of products.

3. Advantages to the Society:

  • Advertisement helps to create more employment opportunities.
  • It provides an important source of income to the press, radio, T.V., etc.
  • It is a source of encouragement to artists.
  • It plays an important role in economic development of the country.
  • It reduces number of middlemen and consumers get quality products at lower cost.

Disadvantages/Objections to Advertising

  • Advertisement encourages consumers to buy unwanted goods.
  • Most of the advertisements are misleading.
  • Advertisement may lead to monopoly of a brand.
  • Advertisement is a costly affair. So, ultimately it increases the price of the product.
  • Advertisement persuades people to purchase even the inferior products.
  • It undermines social and ethical values.

Personal Selling

Personal selling involves face to face contact between the seller and prospective customer with an intension of selling some products. It is a personal form of communication.

Features of Personal Selling:

  • It is a direct presentation of the product to the consumers.
  • Develop personal relationships with the prospective customers.
  • The sales presentation can be adjusted according to the specific needs of the individual customers.
  • It is possible to take a direct feedback from the customer.

Role of Personal Selling:

1) Importance to Businessmen:

  • It helps in influencing the prospects about the merits of a product and thereby increasing its sale.
  • Personal selling helps to develop lasting relationship between the sales persons and the customers.
  • Personal selling plays very important role in the introduction stage of a new product.
  • Personal selling increases the competitive strength of a business organisation.

2) Importance to Customers:

  • Personal selling helps the customers in identifying their needs and wants.
  • Customers get latest market information.
  • Customers get expert advice and guidance in purchasing various goods and services.
  • Personal selling induces customers to purchase new products.

3) Importance to Society:

  • Personal selling offers greater employment opportunities.
  • Personal selling provides attractive career with greater opportunities.
  • Personal selling increases product standardisation and uniformity in consumption pattern.

Sales Promotion

It refers to those marketing activities other than personal selling, advertising and publicity that stimulate short term sales. Sales promotion activities include offering cash discounts, sales contests, free gift offers, and free sample distribution, etc.

Merits of Sales Promotion:

  • Sales promotion activities attract attention of the people.
  • Sales promotion tools can be very effective at the time of introduction of a new product in the market.
  • Sales promotion helps to increase sales.
  • It creates new customers and retains existing customers.
  • Consumers can purchase quality products at low cost.

Limitations of Sales Promotion:

  • If a firm frequently relys on sales promotion, it creates doubts in the minds of consumers about the quality of the product.
  • Use of sales promotion tools may affect the image of a product.
  • It is a short term incentive.

Techniques of Sales Promotion:

  • Rebate : Offering products at special prices, to clear off excess inventory.
  • Discount: Offering products at less than maximum retail price.
  • Refund: The seller offers to refund a part of the price paid by the customer on production of some proof of purchase.
  • Free gifts: Offering another product as gift along with the purchase of a product.
  • Quantity Gift: Offering extra quantity of the product.
  • Contests: Prize contests are organized for the consumers and winners are given attractive prizes.
  • Money refund: There are certain manufacturers who promise to refund the price of the product, if it does not satisfy the consumer.
  • Samples: Offer of free samples of a product to customers at the time of introduction of a new product.

Publicity

Publicity is a non-paid form of non personal communication. The tools of publicity are press conference, publication and news in the electronic media, etc. It is published or broadcasted without charging any money from the firm.

Features of Publicity:

  1. Publicity is an unpaid form of communication.
  2. There is no identified sponsor for the communication

Difference between Personal Selling and Advertising

Advertising:

  • It is an impersonal form of communication.
  • It is inflexible.
  • Same message is sent to all the customers in a market segment.
  • Advertising lacks direct feedback.
  • The cost per person is very low.

Personal Selling:

  • It is a personal form of communication.
  • It is highly flexible.
  • The sales talk is adjusted according to the customer’s background and needs.
  • Personal selling provides direct and immediate feedback.
  • The cost per person is very high.