Plus Two Computer Science Chapter Wise Previous Questions 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 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
* Formais
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:
Hyper Text 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 any one 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 work load 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 sets the alignment of the text in the paragraph3. It has no align 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.

Java script 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 ac cepted scripting language. But 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 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 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

Plus Two Computer Science Chapter Wise Previous Questions 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. [Say – 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. [Say – 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 overflow situation as in the case of array based data structures.
Answer:
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.

Plus Two Computer Science Chapter Wise Previous Questions

Plus Two Computer Science Chapter Wise Previous Questions 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

Plus Two Computer Science Chapter Wise Previous Questions 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 Say 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? [Say – 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. [Say – 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. [Say – 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
Say
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”,Say”,“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 Say 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 Computer Science Chapter Wise Previous Questions

Plus Two Microeconomics Chapter Wise Previous Questions Chapter 1 Introduction to Microeconomics

Kerala Plus Two Microeconomics Chapter Wise Previous Questions Chapter 1 Introduction to Microeconomics

Question 1.
How each of the following affects the Production Possibility Curve of an Economy? (MARCH – 2008)
a) The number of employed workers increase.
b) Tsunami destroys some production facilities.
c) Introduction of capital intensive technique.
d) Increase in fuel price.
Answer:
PPC shifts outward
b) PPC shifts inwards
c) PPC shifts outwards
d) PPC shifts inwards

Question 2.
Below is given a Production Possibility Schedule (MARCH – 2008)
Plus Two Microeconomics Chapter Wise Previous Questions Chapter 1 Introduction to Microeconomics 1
a) Draw the Production Possibility Curve.
b) Prepare the Marginal Opportunity cost in a table based o the PPC.
Answer:
a) 
Plus Two Microeconomics Chapter Wise Previous Questions Chapter 1 Introduction to Microeconomics 2
b)

CottonRiceMOC
3500
3005050
2507525
17012045
10015030
5018030

Question 3.
Micro Economics is otherwise known as “price theory”. Do you agree with this statement? Justify your answer. (MARCH – 2009)
Answer:
Yes.
It is related to the theory of product and factor pricing.

Question 4.
Some Economic Variables are given below. Classify them in a table based on two branches of Economics. Give suitable titles to the column.
General price level, Aggregate consumption,Rent for a house in a city, Demand forfish in a local market. (MARCH – 2009)
Answer:

MicroMacro
Rent for a house in a cityGeneral price level
Demand for fish in a local marketAggregate consumption

Question 5.
A production possibility schedule is given below (MAY-2010)
Plus Two Microeconomics Chapter Wise Previous Questions Chapter 1 Introduction to Microeconomics 5
a) Calculate M.O.C
b) What is the shape of PPC?
Answer:
a)
Plus Two Microeconomics Chapter Wise Previous Questions Chapter 1 Introduction to Microeconomics 6
b) downward slope

Question 6.
Complete the following table : (MARCH-2012)

Features of centrally planned economyFeatures of market economy
1.1.
2.2.

Answer:

Features of centrally planned economyFeatures of market economy
1. Comprehensive planning1. Price mechanism
2. Public sector2. Profit motive
3. Public Welfare3. Private sector

Question 7.
Mention one example for each of the following market structures. (MARCH-2013)
i) Monopoly
ii) Monopolistic competition
Answer:
i) monopoly – Indian railway
ii) monopolistic competition – tooth paste

Question 8.
In a centrally planned economy all important decisions regarding production, exchange and consumption are taken by (MARCH-2014)
a) The Government
b) The Market
c) Either of (a) and (b)
d) The Central Bank
Answer:
The Government

Question 9.
Among the three statements given, which statement is a normative statement? (MAY-2014)
a) People work hard if wages are high.
b) The unemployment rate should be lower
c) Printing too much of money causes inflation.
Answer:
a) people work hard if wages are high.

Question 10.
Who is known as the father of modern Macro Economics? (MARCH-2015)
a) Adam Smith
b) Alfred Marshall
c) J.M.Keynes
d) J.B.Say
Answer:
c) J.M.Keynes

Question 11.
Prepare a production possibility Schedule and draw a production possibility curve on the basis of the schedule, how do you define the PPC? (MAY-2015)
Answer:
Production possibility curve is the locus of combinations of two goods that can be produced when the resources of the economy are fully utilized. Given below a production possible schedule and a production possibility curve.

Production possibilitiesWheatRubber
A0500
B5400
C10300
D15200
E20100
F250

Plus Two Microeconomics Chapter Wise Previous Questions Chapter 1 Introduction to Microeconomics 7

Question 12.
The choice of technology is associated with (MARCH-2016)
a) What to produce?
b) Howto produce?
c) For whom to produce
d) None of these
Answer:
b) How to produce

Question 13.
Central problems faced by an economy can be solved through different ways by different economic systems. (MAY-2016)
a) Which are the important economic systems?
b) How each system solves the central problems?
Answer:
a) Economic systems are:
i) Capitalism
ii) Socialism
iii) Mixed economy
b) Solution of central problems
i) Capitalist economy solves the central economic problems through price mechanism
ii) Socialist economy solves the central economic problems through economic planning.
iii) Mixed economy solves the central economic problems through both price mechanism and central planning.

Question 14.
Identify the curve given below. What does the points A, B, C represents? (MARCH-2017)
Plus Two Microeconomics Chapter Wise Previous Questions Chapter 1 Introduction to Microeconomics 8
Answer:
Production Possibility Curve: It shows various combinations of two goods that an economy can produce with a given level of resources and a given level of technology.
Point ‘A’shows efficient utilisation of resources. Point ‘B’ We can say that at any point above the existing PPC shows the growth of resources and Point ‘C’ inside the production possibility curve implies insufficient utilisation of resources.

Question 15.
Which among the following is not a characteristics of a Capitalist Economy? (MARCH-2017)
a) Wages and prices are administered by the government.
b) Private ownership of means of production.
c) Production takes place for exchange
d) Sale and purchase of labour services at a price is called wage rate.
Answer:
Wages and prices are administered by the government.

Plus Two Economics Chapter Wise Previous Questions and Answers