Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Tamilnadu State Board New Syllabus Samacheer Kalvi 11th Computer Science Guide Pdf Chapter 13 Introduction to Object-Oriented Programming Techniques Text Book Back Questions and Answers, Notes.

Tamilnadu Samacheer Kalvi 11th Computer Science Solutions Chapter 13 Introduction to Object-Oriented Programming Techniques

11th Computer Science Guide Introduction to Object-Oriented Programming Techniques Text Book Questions and Answers

Book Evaluation

Part I

Choose The Correct Answer

Question 1.
The term is used to describe a programming approach based on classes and objects is
a) OOP
b) POP
c) ADT
d) SOP
Answer:
a) OOP

Question 2.
The paradigm which aims more at procedures.
a) Object Oriented Programming
b) Procedural programming
c) Modular programming
d) Structural programming
Answer:
b) Procedural programming

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 3.
Which of the following is a user defined data type?
a) class
b) float
c) int
d) object
Answer:
a) class

Question 4.
The identifiable entity with some characteristics and behaviour is.
a) class
b) object
c) structure
d) member
Answer:
b) object

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 5.
The mechanism by which the data and functions are bound together into a single unit is known as
a) Inheritance
b) Encapsulation
c) Polymorphism
d) Abstraction
Answer:
b) Encapsulation

Question 6.
Insulation of the data from direct access by the program is called as
a) Data hiding
b) Encapsulation
c) Polymorphism
d) Abstraction
Answer:
a) Data hiding

Question 7.
Which of the following concept encapsulate all the essential properties of the object that are to be created?
a) class
b) Encapsulation
c) Polymorphism
d) Abstraction
Answer:
d) Abstraction

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 8.
Which of the following is the most important advantage of inheritance?
a) data hiding
b) code reusability
c) code modification
d) accessibility
Answer:
b) code reusability

Question 9.
“Write once and use it multiple time” can be achieved by
a) redundancy
b) reusability
c) modification
d) composition
Answer:
b) reusability

Question 10.
Which of the following supports the transitive nature of data?
a) Inheritance
b) Encapsulation
c) Polymorphism
d) Abstraction
Answer:
a) Inheritance

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Part – II

Very Short Answer

Question 1.
How is modular programming different from the procedural programming paradigm?
Answer:
Modular programming:

  • Emphasis on the algorithm rather than data.
  • Programs are divided into individual modules.
  • Each modules are independent of each other and have their own local data.
  • Modules can work with their own data as well as with the data passed to it.

Procedural programming:

  • Programs are organized in the form of subroutines or subprograms.
  • All data items are global.
  • Suitable for a small-sized software applications.
  • Difficult to maintain and enhance the program code as any change in data type needs to be propagated to all subroutines that use the same data type.

Question 2.
Differentiate classes and objects.
Answer:
Class: A Class is a construct in C++ which is used to bind data and its associated function together into a single unit using the encapsulation concept. Class is a user-defined data type.

Object: An identifiable entity with some characteristics and behaviour is called an object.

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 3.
What is polymorphism?
Answer:
Polymorphism is the ability of a message or function to be displayed in more than one form.

Question 4.
How are encapsulation and abstraction are interrelated?
Answer:
The mechanism by which the data and functions are bound together into a single unit is known as Encapsulation. It implements abstraction.
Abstraction refers to showing only the essential features without revealing background details.

Question 5.
Write the disadvantages of OOP.
Answer:

  1. Size: Object-Oriented Programs are much larger than other programs.
  2. Effort: Object-Oriented Programs require a lot of work to create.
  3. Speed: Object-Oriented Programs are slower than other programs, because of their size.

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Part – III

Short Answers

Question 1.
What is a paradigm? Mention the different types of paradigm.
Answer:
The paradigm means organizing principle of a program. It is an approach to programming.
There are different approaches available for problem-solving using computers. They are:

  • Procedural programming,
  • Modular Programming and
  • Object-Oriented Programming.

Question 2.
Write a note on the features of procedural programming.
Answer:
Important features of procedural programming

  1. Programs are organized in the form of subroutines or subprograms
  2. All data items are global
  3. Suitable for small-sized software application
  4. Difficult to maintain and enhance the program code as any change in data type needs to be propagated to all subroutines that use the same data type. This is time-consuming.
  5. Example: FORTRAN and COBOL.

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 3.
List some of the features of modular programming
Answer:
Important features of modular programming:

  • Emphasis on the algorithm rather than data.
  • Programs are divided into individual modules.
  • Each modules are independent of each other and have their own local data.
  • Modules can work with its own data as well as with the data passed to it.
  • Example: Pascal and C.

Question 4.
What do you mean by modularization and software reuse?
Answer:

  1. Modularization: where the program can be decomposed into modules.
  2. Software reuse: where a program can be composed of existing and new modules.

Question 5.
Define information hiding.
Answer:
The data is not accessible to the outside world, and only those functions which are wrapped in the class can access it.These functions provide the interface between the object’s data and the program.
This encapsulation of data from direct access by the program is called data hiding or information hiding.

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Part-IV

Explain in Detail

Question 1.
Write the differences between object-oriented programming and procedural programming.
Answer:
Object-Oriented Programming:

  • Emphasizes data rather than algorithms.
  • Data abstraction is introduced in addition to procedural abstraction.
  • Data and its associated operations are grouped into a single unit.
  • Programs are designed around the data being operated.
  • Example: C++, Java, VB.Net, Python

Procedural Programming:

  • Programs are organized in the form of subroutines or subprograms.
  • All data items are global.
  • Suitable for a small-sized software application.
  • Difficult to maintain and enhance the program code as any change in data type needs to be propagated to all subroutines that use the same data type.
  • Example: FORTRAN and COBOL

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 2.
What are the advantages of OOPs?
Answer:
Advantages of OOP Re-usability:
“Write once and use it multiple times” you can achieve this by using class.

Redundancy:
Inheritance is a good feature for data redundancy. If you need the same functionality in multiple classes you can write a common class for the same functionality and inherit that class to sub-class.

Easy Maintenance:
It is easy to maintain and modify existing code as new objects can be created with small differences to existing ones.

Security:
Using data hiding and abstraction only necessary data will be provided thus maintains the security of data.

Question 3.
Write a note on the basic concepts that support OOPs?
Answer:
Object-Oriented Programming has been developed to overcome the drawbacks of procedural and modular programming. It is widely accepted that object-oriented programming is the most important and powerful way of creating software.

The Object-Oriented Programming approach mainly encourages:

  1. Modularization: where the program can be decomposed into modules.
  2. Software reuse: where a program can be composed of existing and new modules.

Main Features of Object-Oriented Programming:

  1. Data Abstraction
  2. Encapsulation
  3. Modularity
  4. Inheritance
  5. Polymorphism

Encapsulation:
The mechanism by which the data and functions are bound together into a single unit is known as Encapsulation. It implements abstraction. Encapsulation is about binding the data variables and functions together in class. It can also be called data binding. Encapsulation is the most striking feature of a class.

The data is not accessible to the outside world, and only those functions which are wrapped in the class can access it. These functions provide the interface between the object’s data and the program. This encapsulation of data from direct access by the program is called data hiding or information hiding.

Data Abstraction:
Abstraction refers to showing only the essential features without revealing background details. Classes use the concept of abstraction to define a list of abstract attributes and function which operate on these attributes. They encapsulate all the essential properties of the object that are to be created. The attributes are called data members because they hold information. The functions that operate on these data are called methods or member functions.

Modularity:
Modularity is designing a system that is divided into a set of functional units (named modules) that can be composed into a larger application.

Inheritance:
Inheritance is the technique of building new classes (derived class) from an existing class (base class). The most important advantage of inheritance is code reusability.

Polymorphism:
Polymorphism is the ability of a message or function to be displayed in more than one form.

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

11th Computer Science Guide Introduction to Object-Oriented Programming Techniques Additional Questions and Answers

Choose The Correct Answer (1 Mark)

Question 1.
In procedural programming all data items are ……………….
(a) Cobol
(b) global
(c) fortran
(d) class
Answer:
(b) global

Question 2.
The object-oriented paradigm allows us to organize software as a collection of objects that consist of …………………..
a) Data
b) Behaviour
c) Both data and behaviour
d) None of these
Answer:
c) Both data and behaviour

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 3.
………………. is an example of object-oriented programming.
(a) Python
(b) Java
(c) VB.Net
(d) All the above
Answer:
(d) All the above

Question 4.
Paradigm means ………………..
a) Organizing principle of a program
b) An approach to programming
c) Either A or B
d) None of these
Answer:
c) Either A or B

Question 5.
………………. is about binding the data variables and functions together in class.
(a) Data abstraction
(b) Modularization
(c) Redundancy
(d) Encapsulation
Answer:
(d) Encapsulation

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 6.
In ………………. approach programs are organized in the form of subroutines or subprograms.
a) Modular Programming
b) Procedural Programming
c) Object-Oriented Programming
d) All the above
Answer:
b) Procedural Programming

Question 7.
…………………. approach of the program is time-consuming.
a) Modular Programming
b) Procedural Programming
c) Object-Oriented Programming
d) All the above
Answer:
b) Procedural Programming

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 8.
……………… language is based on procedural programming.
a) FORTRAN
b) COBOL
c) Both A and B
d) C++
Answer:
c) Both A and B

Question 9.
…………….. paradigm consists of multiple modules; each module has a set of functions of related types.
a) Modular Programming
b) Procedural Programming
c) Object-Oriented Programming
d) All the above
Answer:
a) Modular Programming

Question 10.
In ……………… approach data is hidden under the modules
a) Modular Programming
b) Procedural Programming
c) Object-Oriented Programming
d) All the above
Answer:
a) Modular Programming

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 11.
______ language is based on modular programming.
a) Pascal
b) C
c) Both A and B
d) C++
Answer:
c) Both A and B

Question 12.
………………. paradigm emphasizes the data rather than the algorithm.
a) Modular Programming
b) Procedural Programming
c) Object-Oriented Programming
d) All the above
Answer:
c) Object-Oriented Programming

Question 13.
………………… implements programs using classes and objects.
a) Modular Programming
b) Procedural Programming
c) Object-Oriented Programming
d) All the above
Answer:
c) Object-Oriented Programming

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 14.
A …………….. is a construct in C++ which is used to bind data and its associated function together into a single unit.
a) Class
b) Structure
c) Array
d) None of these
Answer:
a) Class

Question 15.
A Class is a construct in C++ which uses the ……………….. concept.
a) Polymorphism
b) Encapsulation
c) Abstraction
d) Inheritance
Answer:
b) Encapsulation

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 16.
Class is a ……………… data type.
a) User-defined
b) Derived
c) Primitive
d) None of these
Answer:
a) User-defined

Question 17.
…………………. can be defined as a template or blueprint representing a group of objects that share common properties and relationship.
a) Class
b) Structure
c) Array
d) None of these
Answer:
a) Class

Question 18.
……………….. are the basic unit of OOP.
a) Attributes
b) Objects
c) Members
d) None of these
Answer:
b) Objects

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 19.
The class variables are called……………………
a) Instances
b) Objects
c) Either A or B
d) None of these
Answer:
c) Either A or B

Question 20.
An identifiable entity with some characteristics and behaviour is called ………………
a) Instances
b) Objects
c) Either A or B
d) None of these
Answer:
c) Either A or B

Question 21.
In ……………… method, programs are designed around the data being operated.
a) Modular Programming
b) Procedural Programming
c) Object-Oriented Programming
d) All the above
Answer:
c) Object-Oriented Programming

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 22.
………………… language is based on object-oriented programming.
a) C++, Java
b) VB.Net
c) Python
d) All the above
Answer:
d) All the above

Question 23.
……………… is widely accepted that object-oriented programming is the most important and powerful way of creating software.
a) Modular Programming
b) Procedural Programming
c) Object-Oriented Programming
d) All the above
Answer:
c) Object-Oriented Programming

Question 24.
The Object-Oriented Programming approach mainly encourage ______
a) Modularisation
b) Software re-use
c) Both A and B
d) None of these
Answer:
c) Both A and B

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 25.
…………………….. means the program can be decomposed into modules.
a) Modularisation
b) Software re-use
c) Both A and B
d) None of these
Answer:
a) Modularisation

Question 26.
………………… means, a program can be composed of existing and new modules.
a) Modularisation
b) Software re-use
c) Both A and B
d) None of these
Answer:
b) Software re-use

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 27.
The main feature of Object-Oriented Programming is ………………….
a) Data Abstraction and Encapsulation
b) Modularity
c) Inheritance and Polymorphism
d) All the above
Answer:
d) All the above

Question 28.
……………………. implements abstraction.
a) Polymorphism
b) Encapsulation
c) Abstraction
d) Inheritance
Answer:
b) Encapsulation

Question 29.
……………….. can be called data binding.
a) Polymorphism
b) Encapsulation
c) Abstraction
d) Inheritance
Answer:
b) Encapsulation

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 30.
……………………… is the most striking feature of a class,
a) Polymorphism
b) Encapsulation
c) Abstraction
d) Inheritance
Answer:
b) Encapsulation

Question 31.
The encapsulation of data from direct access by the program is called …………………….
a) Data hiding
b) Information hiding
c) Either A or B
d) None of these
Answer:
c) Either A or B

Question 32.
…………………… refers to showing only the essential features without revealing background details,
a) Polymorphism
b) Encapsulation
c) Abstraction
d) Inheritance
Answer:
c) Abstraction

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 33.
The attributes are called ……………………..
a) Data members
b) Methods
c) Member functions
d) Either B or C
Answer:
a) Data members

Question 34.
…………………….. hold information.
a) Data members
b) Methods
c) Member functions
d) Either B or C
Answer:
a) Data members

Question 35.
The functions that operate on data numbers are called …………………..
a) Data members
b) Methods
c) Member functions
d) Either B or C
Answer:
d) Either B or C

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 36.
………………. is designing a system that is divided into a set of functional units.
a) Polymorphism
b) Modularity
c) Abstraction
d) Inheritance
Answer:
b) Modularity

Question 37.
……………………. is the technique of building new classes from an existing class,
a) Polymorphism
b) Modularity
c) Abstraction
d) Inheritance
Answer:
d) Inheritance

Question 38.
In inheritance, the existing class is called as …………………….. class.
a) Base
b) Derived
c) Abstract
d) None of these
Answer:
a) Base

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 39.
In inheritance, the newly created class is called as ………………… class.
a) Base
b) Derived
c) Abstract
d) None of these
Answer:
b) Derived

Question 40.
……………… is the ability of a message or function to be displayed in more than one form.
a) Polymorphism
b) Modularity
c) Abstraction
d) Inheritance
Answer:
a) Polymorphism

Question 41.
……………. means, write once and use it multiple times.
a) Re-usability
b) Redundancy
c) Security
d) None of these
Answer:
a) Re-usability

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 42.
If we need the same functionality in multiple class you will write a common class for the same functionality and inherit that class to subclass is called ……………………
a) Re-usability
b) Redundancy
c) Security
d) None of these
Answer:
b) Redundancy

Question 43.
………………. is a good feature for data redundancy.
a) Polymorphism
b) Modularity
c) Abstraction
d) Inheritance
Answer:
d) Inheritance

Question 44.
…………………… programs are much larger than other programs.
a) Modular
b) Procedural
c) Object-Oriented
d) All the above
Answer:
c) Object-Oriented

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Question 45.
………………….. program requires a lot of work to create.
a) Modular
b) Procedural
c) Object-Oriented
d) All the above
Answer:
c) Object-Oriented

Question 46.
……………… programs .are slower than other programs, because of their size.
a) Modular
b) Procedural
c) Object-Oriented
d) All the above
Answer:
c) Object-Oriented

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Very Short Answers 2 Marks

Question 1.
Write a note on an object-oriented program.
Answer:
Object-Oriented Programming (OOP) is the term used to describe a programming approach based on classes and objects. The object-oriented paradigm allows us to organize software as a collection of objects that consist of both data and behaviour.

Question 2.
What is modularity?
Answer:
Modularity is designing a system that is divided into a set of functional units (named modules) that can be composed into a larger application.

Question 3.
Define Data binding.
Answer:
Encapsulation is about binding the data variables and functions together in class. It can also be called data binding.

Samacheer Kalvi 11th Computer Science Guide Chapter 13 Introduction to Object-Oriented Programming Techniques

Short Answers (3 Marks)

Question 1.
Write about objects.
Answer:
Objects: Represents data and its associated function together into a single unit. Objects are the basic unit of OOP. Basically, an object is created from a class. They are instances of class also called class variables. An identifiable entity with some characteristics and behaviour is called an object.

Question 2.
What are Encapsulation and data binding?
Answer:
The mechanism by which the data and functions are bound together into a single unit is known as Encapsulation. Encapsulation is the most striking feature of a class. The data is not accessible to the outside world, and only those functions which are wrapped in the class can access it. These functions provide the interface between the object’s data and the program. This encapsulation of data from direct access by the program is called data hiding or information hiding.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Tamilnadu State Board New Syllabus Samacheer Kalvi 11th Computer Science Guide Pdf Chapter 12 Arrays and Structures Text Book Back Questions and Answers, Notes.

Tamilnadu Samacheer Kalvi 11th Computer Science Solutions Chapter 12 Arrays and Structures

11th Computer Science Guide Arrays and Structures Text Book Questions and Answers

Book Evaluation

Part I

Choose The Correct Answer

Question 1.
which of the following is the collection of variables of the same type that are referenced by a common name ?
a) int
b) float
c) Array
d) class
Answer:
c) Array

Question 2.
Array subscripts is always starts with which number ?
a) -1
b) 0
c) 2
d) 3
Answer:
b) 0

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 3.
int age[ ]={6,90,20,18,2}; How many elements are there in this array?
a) 2
b) 5
c) 6
d) 4
Answer:
b) 5

Question 4.
cin>>n[3]; To which element does this statement accepts the value?
a) 2
b) 3
c) 4
d) 5
Answer:
c) 4

Question 5.
By default, the string end with which character?
a) \0
b) \t
c) \n
d) \b
Answer:
a) \0

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Part – II

Very Short Answers

Question 1.
What is Traversal in an Array?
Answer:
Accessing each element of an array at least once to perform any operation is known as “Traversal”. Displaying all the elements in an array is an example of “traversal”.

Question 2.
What is Strings?
Answer:
A string is defined as a sequence of characters where each character may be a letter,’ number or a symbol.
Every string is terminated by a null (\0) character which must be. appended at the end of the string.

Question 3.
What is the syntax to declare two – dimensional array? ‘
Answer:
The declaration of a 2-D array is
datatype array_name[row – size] [col – size];
In the above declaration, data-type refers to any valid C++ data – type, array _ name refers to the name of the 2 – D array, row – size refers to the number of rows and col-size refers to the number of columns in the 2 – D array.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Part – III

Short Answers

Question 1.
Define an Array. What are the types?
Answer:
An array is a collection of variables of the same type that are referenced by a common name.
There are different types of arrays used in C++. They are:

  • One-dimensional arrays
  • Two-dimensional arrays
  • Multi-dimensional arrays

Question 2.
With note an Array of strings.
Answer:
An array of strings is a two – dimensional character array. The size of the first Index (rows) denotes the number of strings and the size of the second index (columns) denotes the maximum length of each string. Usually, an array of strings are declared in such a way to accommodate the null character at the end of each string. For example, the 2-D array has the declaration:
char name [7][10];
In the above declaration,
No. of rows = 7;
No. of columns = 10;
We can store 7 strings each with a maximum length of 10 characters.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 3.
Write a C++ program to accept and print your name?
Answer:
PROGRAM
#include<iostream>
using namespace std;
int main( )
{
char str[100];
cout<< “Enter your name :”;
cin.get(str,100);
cout<< “You name is : ” << str <<endl;
return 0;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 1

Part – IV

Explain In Detail

Question 1.
write a c++ program to find the difference between two matrix.
Answer:
PROGRAM
#include<iostream>
#include<conio.h>
using namespace std;
int main( )
{
int row, col, m1[10][10], m2[10][10], sum[10][10];
cout<<“Enter the number of rows : “;
cin>>row;
cout<<“Enter the number of columns :”;
cin>>col;
cout<< “Enter the elements of first matrix: “<<endl;
for (int i = 0;i<row;i++ )
for (int j = 0;j <col;j++ )
cin>>m1[i][j];
cout< < “Enter the elements of second matrix: “<<endl;
for (int i = 0;i<row;i++ )
for (int j = 0;j<col;j++ )
< cin>>m2[i][j];
cout<<“Output: “<<endl;
for (int i = 0;i<row;i++ )
{
for (int j = 0;j<col;j++ )
{
sum[i][j]=m1[i][j] – m2[i][j]); cout<<sum[i][j]<<“”;
}
cout<<endl<<endl;
}
getch( );
return 0;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 2

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 2.
How will you pass two dimensional array to a function explain with example.
Answer:
Passing 2″D array to a function:
C++ program to display values from two dimensional array.
#include<iostream>
using namespace std;
void display (int n[3][2]);
int main( )
{
int num[3][2] = { {3, 4}, {9, 5>, {7, 1} } ;
display(num);
return 0;
}
void display(int n[3][2])
{
cout << “\n Displaying Values” << endl; for (int i=0; i<3; i++)
{
for (int j=0; j<2; j++)
{
cout << n[i][j] << “”;
}
cout << endl << endl;
}
}
Output
Displaying Values
3 4
9 5
7 1
In the above program, the two-dimensional array num is passed to the function display
( ) to produce the results.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

11th Computer Science Guide Arrays and Structures Additional Questions and Answers

Choose The Correct Answer (1 Mark)

Question 1.
The size of the array is referred to as its ………………..
(a) dimension
(b) direction
(c) location
(d) space
Answer:
(a) dimension

Question 2.
…………… is an easy way of storing multiple values of the same type referenced by a common name.
a) Variables
b) Literals
c) Array
d) None of these
Answer:
c) Array

Question 3.
Displaying all the elements in an array is an example of ………………..
(a) memory allocation
(b) call by reference
(c) traversal
(d) none of these
Answer:
(c) traversal

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 4.
A (n) ………………….. is a collection of variables of the same type that are referenced by a common name.
a) Structures
b) Array
c) Unions
d) None of these
Answer:
b) Array

Question 5.
During ……………….. the array of elements cannot be initialized more than its size.
(a) declaration
(b) initialization
(c) assigning
(d) execution
Answer:
(b) initialization

Question 6.
The …………….. of the array is referred to as its dimension.
a) Elements
b) Size
c) Format
d) None of these
Answer:
b) Size

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 7.
Pass an array to a function in C++, the function needs the array name as ………………..
(a) a function
(b) an argument
(c) global object
(d) string
Answer:
(b) an argument

Question 8.
…………………. is a type of arrays used in C++.
a) One-dimensional array
b) Two-dimensional array
c) Multidimensional array
d) All the above
Answer:
d) All the above

Question 9.
A structure without a name tag is called ………………..
(a) homogenous structure
(b) anonymous structure
(c) array of structure
(d) dynamic memory
Answer:
(b) anonymous structure

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 10.
A one-dimensional array represents values that are stored in a single …………….
a) Row
b) Column
c) Either A or B
d) None of these
Answer:
c) Either A or B

Question 11.
Array size should be specified with …………………
a) square brackets[ ]
b) Parenthesis ( )
c) Curly braces{ }
d) Angle brackets < >
Answer:
a) square brackets[ ]

Question 12.
In an array declaration, ……………… defines how many elements the array will hold.
a) array_name
b) array_size
c) data_type
d) None of these
Answer:
b) array_size

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 13.
In an array declaration, …………………. declares the basic type of the array, which is the type of each element in the array.
a) array_name
b) array_size
c) data type
d) None of these
Answer:
c) data type

Question 14.
In an array declaration, ……………….. specifies the name with which the array will be referenced
a) array_name
b) array_size
c) data type
d) None of these
Answer:
a) array_name

Question 15.
The array subscript always starts with ………………
a) 0
b) 1
c) -1
d) None of these
Answer:
a) 0

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 16.
The subscript always is a(n) ………………value.
a) Integer
b) Unsigned integer
c) Signed integer
d) float
Answer:
b) Unsigned integer

Question 17.
In Turbo C++, int data type requires …………….. bytes of memory.
a) 4
b) 8
c) 2
d) 1
Answer:
c) 2

Question 18.
In Dev C++, int data type requires ………………. bytes of memory,
a) 4
b) 8
c) 2
d) 1
Answer:
a) 4

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 19.
The memory space allocated for an array can be calculated using the -formula.
a) Number of bytes allocated for the type of array + Number of elements
b) Number of bytes allocated for the type of array x Number of elements
c) Number of bytes allocated for the type of array – Number of elements
d) None of these
Answer:
b) Number of bytes allocated for the type of array x Number of elements

Question 20.
An array can be initialized at the time of its ………………
a) Declaration
b) Process
c) Either A or B
d) None of these
Answer:
a) Declaration

Question 21.
Unless an array is initialized, all the array elements contain ……………..values.
a) Null
b) Default
c) Garbage
d) None of these
Answer:
c) Garbage

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 22.
While declaring and Initializing values In an array, the values should be given within the ……………..
a) square brackets[ ]
b) Parenthesis ()
c) Curly braces{ }
d) Angle brackets < >
Answer:
c) Curly braces{ }

Question 23.
The …………….. of an array may be optional when the array is initialized during declaration.
a) Data type
b) Size
c) Name
d) None of these
Answer:
b) Size

Question 24.
The subscript in the bracket can be a(n) ……………….
a) Variable
b) Constant
c) Expression that evaluates to an integer
d) Either A or B or C
Answer:
d) Either A or B or C

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 25.
Accessing each element of an array at least once to perform any operation is known as ………………..
a) Traversal
b) Process
c) Reference
d) None of these
Answer:
a) Traversal

Question 26.
…………………. is a process of finding a particular value present in a given set of numbers.
a) Filtering
b) Searching
c) Seeking
d) None of these
Answer:
b) Searching

Question 27.
The ………………. compares each element of the list with the value that has to be searched until all the elements in the array have been traversed and compared.
a) Linear search
b) Sequential search
c) Either A or B
d) None of these
Answer:
c) Either A or B

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 28.
A ……………. is defined as a sequence of characters where each character may be a letter, number, or a symbol.
a) String
b) Character
c) Literal
d) Identifier
Answer:
a) String

Question 29.
In C++, there is no basic data type to represent a …………….
a) String
b) Character
c) Literal
d) float
Answer:
a) String

Question 30.
How much memory required for the following array?
char country[6];
a) 12 bytes
b) 6 bytes
c) 60 Bytes
d) 24 bytes
Answer:
b) 6 bytes

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 31.
…………….. is a way of initializing the character array:
a) char country[6]={T, ‘N’ ‘D’ ‘I’, ‘A’, ‘\0’};
b) char country[ ]=”INDIA”;
c) char country[ ]={T, ‘N’, ‘D’, T, ‘A’ ‘\0’};
d) Either A or B or C
Answer:
d) Either A or B or C

Question 32.
Which is a correct statement from the following?
a) At the end of the string, a null character is automatically added by the compiler.
b) If the size of the array is not explicitly mentioned, the compiler automatically calculates the size of the array based on the number of elements in the list and allocates space accordingly.
c) In the initialization of the string, if all the characters are not initialized, then the rest of the characters will be filled with NULL.
d) All the above
Answer:
d) All the above

Question 33.
In C++,………………. is used to read a line of text including blank spaces.
a) cin.get( )
b) cin
c) put( )
d) None of these
Answer:
a) cin.get( )

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 34.
………………. function can read the characters till it encounters a newline character or a delimiter specified by the user.
a) getline( )
b) put
c) puts( )
d) None of these
Answer:
a) getline( )

Question 35.
…………………. arrays are a collection of similar elements where the elements are stored in a certain number of rows and columns.
a) One dimensional
b) Two dimensional
c) Multidimensional
d) All the above
Answer:
b) Two dimensional

Question 36.
In two dimensional arrays, …………………. size is compulsory.
a) Column
b) Row
c) Both A and B
d) None of these
Answer:
a) Column

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 37.
In two dimensional arrays, …………….. size is optional.
a) Column
b) Row
c) Both A and B
d) None of these
Answer:
b) Row

Question 38.
int A[3][4 j; How many elements are there in the array “A”?
a) 3
b) 4
c) 7
d) 12
Answer:
d) 12

Question 39.
The two-dimensional array uses ………………. index values to access a particular element in it.
a) two
b) one
c) three
d) many
Answer:
a) two

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 40.
In a two dimensional array, the first index specifies the …………….. value.
a) Column
b) Row
c) Both A and B
d) None of these
Answer:
b) Row

Question 41.
In a two dimensional array, the second index specifies the …………… value.
a) Column
b) Row
c) Both A and B
d) None of these
Answer:
a) Column

Question 42.
The two-dimensional array can be viewed as a …………………
a) List
b) Matrix
c) Linear block
d) None of these
Answer:
b) Matrix

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 43.
There are …………… types of 2-D array memory representations.
a) two
b) one
c) three
d) many
Answer:
a) two

Question 44.
……………… is a type of 2-D array memory representation.
a) Row-Major order
b) Column-Major order
c) Either A or B
d) None of these
Answer:
c) Either A or B

Question 45.
In row-major order, all the elements are stored ……………… in contiguous memory locations.
a) Column by Column
b) Row by Row
c) Both A and B
d) None of these
Answer:
b) Row by Row

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 46.
In column-major order, all the elements are stored ………………. in contiguous memory locations.
a) Column by Column
b) Row by Row
c) Both A and B
d) None of these
Answer:
a) Column by Column

Question 47.
An array of strings is a ………………. dimensional character array,
a) Two
b) One
c) Multi
d) None of these
Answer:
a) Two

Question 48.
In a two-dimensional character array, the size of the first index (rows) denotes the ……………….
a) Maximum length of each string
b) Number of strings
c) Maximum characters
d) None of these
Answer:
b) Number of strings

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 49.
In a two-dimensional character array, the size of the second index (rows) denotes the ……………….
a) Maximum length of each string
b) Number of strings
c) Maximum characters
d) None of these
Answer:
a) Maximum length of each string

Question 50.
char Name[6][10]; How many strings can be stored in the above array?
a) 10
b) 60
c) 6
d) 16
Answer:
c) 6

Question 51.
To pass an array to a function in C++, the function needs the ………….. as an argument,
a) Array name
b) Array type
c) Dimension
d) None of these
Answer:
a) Array name

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Very Short Answers (2 Marks)

Question 1.
What is the formula to calculate the memory space allocated for an array?
Answer:
A number of bytes allocated for the type of array x Number of elements.

Question 2.
What are the types of arrays?
Answer:
There are different types of arrays used in C++. They are:

  1. One-dimensional arrays
  2. Two-dimensional arrays
  3. Multi-dimensional arrays

Question 3.
Write about returning structures from functions.
Answer:
A structure can be passed to a function through its object. Therefore, passing a structure to a function or passing a structure object to a function is the same because the structure object represents the structure. Like a normal variable, a structure variable(structure object) can be passed by value or by references/addresses. Similar to built-in data types, structures also can be returned from a function.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 4.
Write the syntax and example for one-dimensional declaration and initialization.
Answer:
Syntax:
[size] = {value-1,value-2,………….,value-n};
Example:
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 3

Question 5.
What is a global object?
Answer:
Objects declared along with structure definition are called global objects.

Question 6.
Write a note on strings.
Answer:
strings:
A string is defined as a sequence of characters where each character may be a letter, number or symbol. Each element occupies one byte of memory. Every string is terminated by a null C\0′ ASCII code 0) character which must be appended at the end of the string.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 7.
Differentiate array and structure.
Answer:
Array:

  • An array is a collection of variables of the same data type.
  • Array data are accessed using index.
  • Array allocates static memory
  • Array element access takes lesser time.

Structure:

  • A structure is a collection of variables of different data type.
  • Structure elements are accessed using operator.
  • Structures allocate dynamic memory.
  • Structure elements take more time.

Short Answers (3 Marks)

Question 1.
Write about the initialization of 2 – D array.
Answer:
The array can be initialized in more than one way at the time of 2-D array declaration.
For example
int matrix[4][3] = {
{10,20,30},// Initializes row 0
{40,50,60},// Initializes row 1
{70,80,90},// Initializes row 2
{100,110,120}// Initializes row 3
};
int matrix[4][3] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120};
Array’s row size is optional but column size is compulsory.

Question 2.
What is subscript? Give its rules,
Answer:
subscript:
Each element has a unique index number starting from 0 which is known as a subscript.
Rules for subscript:

  • The subscript always starts with 0.
  • It should be an unsigned integer value.
  • Each element of an array is referred to by its name with a subscript index within the square bracket.

For example:
num[3] refers to the 4th element in the array.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 3.
How memory locations are allocated to a one-dimensional array?
Answer:
Memory representation of a one-dimensional array:
The amount of storage required to hold an array is directly related to type and size.
The following figure shows the memory allocation of an array with five elements.
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 4
The above figure clearly shows that the array num is an integer array with 5 elements. Here, there is a total of 5 elements in the array, where for each element, 4 bytes in Dev C++ (or)2 bytes in Turbo C++ will be allocated. Totally 20 bytes will be allocated for this array (In Turbo C++ 10 Bytes).

Question 4.
Tabulate the memory requirement of data type in Turbo C++ and Dev C++.
Answer:

Data type

Turbo C++

Dev C++

char 1 1
int 2 4
float 4 4
long 4 4
double 8 8
long double 10 10

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 5.
Explain character Array (String) creation with syntax and example.
Answer:
To create any kind of array, the size (length) of the array must be known in advance, so that the memory locations can be allocated according to the size of the array. Once an array is created, its length is fixed and cannot be changed during run time, This is shown in the following figure.
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 5
Syntax of array declaration is:
char array_name[size];
In the above declaration, the size of the array must be an unsigned integer value.

For example,
char country[6];
Here, the array reserves 6 bytes of memory, for storing’ a seqi characters. The length of the string cannot be more than 5 characters and one location is reserved for the null character at the end.

Question 6.
What is an array of strings?
Answer:
An array of strings is a two – dimensional character array. The size of the first index (rows) denotes the number of strings and the size of the second index (columns) denotes the maximum length of each string. Usually, an array of strings are declared in such a way to accommodate the null character at the end of each string. For example, the 2 – D array has the declaration: char Name[6][10];
In the above declaration, the 2 – D array has two indices which refer to the row size and column size, that is 6 refers to the number of rows, and 10 refers to the number of columns.

Question 7.
Write note on getline( ) function.
Answer:
In C++, getline( ) is also used to read a line . of text from the input stream. It can read the characters tilt it encounters a newline character or a delimiter specifier’ by the user. This function is available in the header.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 8.
How memory represented for a 2-D array?
Answer:
There are two types of 2-D array memory representations. They are:

  • Row Major order
  • Column Major order

For example:
int A[4][3]={ { 8,6,5}, { 2,1,9}, {3,6,4}, {4,3,2} };
Row Major order:
In row-major order, all the elements are stored row by row in continuous memory locations, that is, ail the elements in first row, then in the second row and soon. The memory representation of row-major order is as shown below.
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 6

Question 9.
How 2-D character array initialized and stored in memory? Explain.
Answer:
2D char array initialization:

For example:
char Name[6][10] = {“Mr. Bean’; “Mr.Bush”
“Nicole”, “Kidman” “Arnold”, “Jodie”};
In the above’ example, the 2-D array is initialized with 6 strings, where the string is a maximum of 9 characters long since the last character is null. The memory arrangement of a 2-D array is shown below and ail the strings are stored in continuous locations.
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 7

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 10.
What is called nested structure? Give example.
Answer:
The structure declared within another structure is called a nested structure. Nested structures act as members of another structure and the members of the child structure can be accessed as parent structure name. Child structure name. Member name, struct dob
{
int date;
char month[3];
int year;
} ;
Values can be assigned to this structure as follows.
dob = {25, “DEC”, 2017}

Question 11.
Write a program to pass an array as an argument to a function.
Answer:
In C++, arrays can be passed to a function as an argument.
To pass an array to a function in C++, the function needs the array name as an argument.
C++ program-to display marks of 5 students (one-dimensional array)
#indude<iostream>
using namespace std;
void display (int m[5]);
int main( )
{
int marks[5]={88, 76, 90, 61, 69};
display(marks);
return 0;
}
void’ display (int m[5])
{
cout << “\n. Display Marks: ” << end!; for (int i=0; i<5; i++)
{
cout <-< “Student” << i+1 << ” << m[i]<<endl;
}
}
Output
Display Marks:
Student 1: 88
Student 2: 76
Student 3: 90
Student 4: 61
Student 5: 69

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 12.
Write a C++ program to pass a 2-D array to a function.
Answer:
C++ program to display values from two dimensional array:
#include<iostream>
using namespace std;
void display (int n[3][2]);
int main( )
{
int num[3][2] = { {3, 4}, (9, 5}, {7,1} };
display(num);
return 0; ‘
}
void display(int n[3][2])
{
cout << “\n Displaying Values” << endl;
for (int i=0; i<3; i++)
{
for (int j=0; j<2; j++)
{
cout << n[i][j] << ”
}
cout << endl << endl;
}
}
Output
Displaying Values
3 4
9 5
7 1

Question 13.
Write a user-defined function to return the structure after accepting value through the keyboard. The structure definition is as follows: struct Item{int item no; float price;};
Answer:
item accept (item i)
{

cout << “\n Enter the Item No:”; cin >> i.no;
cout << “\n Enter the Item Price:”; cin >> i.price;
return i;

}

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Explain in Detail (5 Marks)

Question 1.
How will you search an element in a one-dimensional array? Explain linear search.
Answer:
Searching in a one-dimensional array:
Searching is a process of finding a particular value present in a given set of numbers. The linear search or sequential search compares each element of the list with the value that has to be searched until all the elements in the array have been traversed and compared.

Program for Linear Search
#include<iostream>
using namespace std;
int Search(int arr[ ], int size, int value)
{
for (int i=0; <size; i++)
{
if (arr[i] == value)
return i; // return index value
}
return -1;
}
int main( )
{
int num[10], val, id;
for (int i=0; i< 10; i++) .
{
cout<<“\n Enter value” << i+1 <<“=”;
cin>>num[i];
}
cout<< “\n Enter a value to be searched: “;
cin>>val;
id=Search(num,10,val);
if(id==-1) .
cout<< “\n Given value is not found in the array..”;
else
cout<< “\n The value is found at the position” << id+1;
return 0;
}
The above program reads an array and prompts for the values to be searched. It calls the Search() function which receives array, size and value to be searched as parameters. If the value is found, then it returns the array index to the called statement; otherwise, it returns -1.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 2.
Explain two-dimensional array with syntax and example.
Answer:
Two-dimensional array:
Two-dimensional (2D) arrays are collections of similar elements where the elements are stored in a certain number of rows and columns. An example m x n matrix where m denotes the number of rows and n denotes the number of columns is shown in the following figure, int arr[3][3];
2D array conceptual memory representation
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 8

The array arr can be conceptually viewed in matrix form with 3 rows and columns. point to be noted here is since the subscript starts with 0 arr [0][0] represents the first element.

The syntax for declaration of a 2-D array is:
data-type array_name[row-size][col-size];
In the above declaration, data-type refers to any valid C++ data-type, array_name refers to the name of the 2-D array, row-size refers to the number of rows and col-size refers to the number of columns in the 2-D array.

For example:
int A[3][4];
In the above example, A is a 2-D array, 3 denotes the number of rows and 4 denotes the number of columns. This array can hold a maximum of 12 elements.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Case Study

Question (1)
Write a program to accept the marks of 10 students and find the average, maximum and minimum marks.
Answer:
PROGRAM
#include<iostream>
using namespace std;
int main( )
{
int marks[10], sum=0,max,min;
float avg;
cout<< “\n Enter Mark 1” << “=”;
cin>> marks[0];
max=marks[0];
min=marks[0];
for(int i=1; i< 10; i++)
{
cout<< “\n Enter Mark” << i+1 << “=”;
cin>> marks[i];
sum=sum+marks[i];
if (marks[i]>max)
max = marks[i];
if (marks[i]<min)
min = marks[i];
}
avg=sum/10.0;
cout<< “\n The Total Marks: ” << sum;
cout<< “\n The Average Mark: ” <<avg;
cout<< “\n The Maximum Mark: ” <<max;
cout<< “\n The Minimum Mark: ” <<min;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 9

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question (2)
Write a program to accept rainfall recorded in four metropolitan cities of India and find the city that has the highest and lowest rainfall.
Answer:
PROGRAM
#include<iostream>
#include<string.h>
using namespace std;
int main( )
{
int rate[10],min,n;
char shop[5][20];
char minshop[20];
cout<<“\nHow many Shops
cin>>n;
for(int i=0;i<n;i++)
{
cout<<“\nEnter Name of the Shop “<<i+1<<” :”;
cin> >shop[i];
cout<<“\nEnter price of Product-X at “<<shop[i]<<” :”;
cin>>rate[i];
}
min=rate[0];
strcpy(minshop,shop[0]);
for(int i=l;i<n;i++)
{
if (rate[i]<min)
{
min = rate[i];
strcpy(minshop,shop[i]);
}
}
cout< < “\n The Lowest cost of the Proudct=X at the” “<<minshop <<“is”<<min;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 10

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question (3)
Survey your neighboring shops and find the price of any particular product of interest and suggest where to buy the product at the lowest cost.
Answer:
PROGRAM
#include<iostream>
#include<string.h>
using namespace std;
int main( )
{
int rate[10],min,n;
char shop[5][20];
char minshop[20];
cout<<“\nHow many Shops “;
cin>>n;
for(int i=0;i<n;i++)
{
cout<<“\nEnter Name of the Shop “<<i+l<<” :”;
cin>>shop[i];
cout<<“\nEnter price of Product-X at “<<shop[i]<<“:”;
cin> >rate[i];
}
min=rate[0];
strcpy(nninshop,shop[0]);
for(int i=l;i<n;i++)
{
if (rate[i]<min)
{
min = rate[i];
strcpy(minshop,shop[i]);
}
}
cout< < “\n The Lowest cost of the Proudct=X at the ” <<minshop <<“is”<<min;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 11

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

STRUCTURES

Book Evaluation

Part -I

Choose The Correct Answer

Question 1.
The data elements in the structure are also known as ……………..
a) objects
b) members
c) data
d) records
Answer:
b) members

Question 2.
Structure definition is terminated by ……………..
a) :
b) }
c) ;
d) ::
Answer:
c) ;

Question 3.
What will happen when the structure is declared?
a) it will not allocate any memory
b) it will allocate the memory
c) it will be declared and initialized
d) it will be only declared
Answer:
b) it will allocate the memory

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 4.
What is the out of this program?
#include<iostream>
#include<string.h>
using namespace std;
int main( )
{
struct student
{
int n;
char name[10];
};
students;
s.n = 123;
183
strcpy(s.name, “Balu”);
cout<<s.n;
co
ut<< s.name <<endl;
return 0;
}
a) 123Balu
b) BaluBalu
c) Balul23
d) 123 Balu
Answer:
a) 123Balu

Question 5.
A structure declaration is given below.
struct Time
{
int hours;
int minutes;
int seconds;
}t;
Using the above declaration which of the following refers to seconds.
a) Time.seconds
b) Time::seconds
c) seconds
d) t. seconds
Answer:
d) t. seconds

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 6.
What will be the output of this program?
#include <iostream>
using namespace std;
struct ShoeType
{
string name; double price;
>; , ‘ ‘
int main()
184 {
ShoeType shoe1, shoe2;
shoe1.name = “Adidas”;
shoe1.price = 9.99;
cout<< shoe1.name<< ” #. “<< shoe1.
price<<endl;
shoe2 = shoe1;
shoe2.price = shoe2.price / 9;
cout<< shoe2.name<< ” # “<< shoe2.price;
return 0;

a) Adidas # 9.99 Adidas #1.11 b) Adidas # 9.99 Adidas # 9.11
c) Adidas # 9.99 Adidas # 11.11 d) Adidas #9.11 Adidas # 11.11

Answer:
a) Adidas # 9.99 Adidas #1.11

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 7.
Which of the following is a properly defined structure?
a) struct {int num;}
b) struct sum {int num;}
c) struct sum int sum;
d) struct sum {int num;};
Answer:
d) struct sum {int num;};

Question 8.
A structure declaration is given below.
struct employee
{
int empno;
char ename[10];
} e[5];
Using the above declaration which of the following statement is correct.
a) cout<<e[0].empno<<e[0].ename;
b) cout<<e[0].empno<<ename;
c) cout< <e[0]->empno< <e[0]->ename;
d) cout<<e.empno<<e.ename;
Answer:
a) cout<<e[0].empno<<e[0].ename;

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 9.
Which of the following cannot be a structure member?
a) Another structure
b) Function
c) Array
d) variable of double datatype
Answer:
b) Function

Question 10.
When accessing a structure member, the identifier to the left of the dot operator is the name of
a) structure variable
b) structure tag
c) structure member
d) structure-function
Answer:
a) structure variable

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Part – II

Very Short Answers

Question 1.
Define structure. What is its use?
Answer:
Definition:
The structure is user-defined which has the combination of data items with different data types. This allows to a group of variables of mixed data types together into a single unit.
Use: The structure provides a facility to store different data types as a part of the same logical element in one memory chunk adjacent to each other.

Question 2.
To store 100 integer numbers which of the following is good to use?
Answer:
Array or Structure State the reason.
In any situation when more than one variable is required to represent objects of uniform data types, an array can be used. If the elements are of different data types, then the array cannot support them.
The structure provides a facility to store different data types as a part of the same logical element in one memory chunk adjacent to each other. So, to store 100 integer numbers Array is good.

Question 3.
What is the error in the following structure definition.
Answer:
struct employee {inteno; charename[20]; char dept;}
Employee e1,e2;

Error:
In the above code objects for employee strcture is created at the end of structure definition. So,structure name is not needed. It may written as:
struct employee
{
int eno;
char ename[20];
char dept;
}e1,e2;

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 4.
Write a structure definition for the structure student containing exam no, name and an array for storing five subject marks.
Answer:
Structure definition:
struct student
{
int examno;
char sname[30];
int mark [5];
};

Question 5.
Why for passing a structure to a function call by reference is advisable to us?
Answer:
In call by reference, any change made to the contents of structure variable inside the function are reflected back to the calling function. Otherwise changes in the structure content within the function will not implement in the structure content.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 6.
What is the size of the following highlighted variable in terms of byte if it is compiled in dev C++
Answer:
struct A{ float f[3]; char ch[5];long double d;>;
struct B{ A a; int arr[2][3];}b[3]
struct A {float f[3]; char ch[5]; long double d;>;
Memory requirements (Using Dev C++):

Variable

Memory requirement

float f(3); 12 Bytes
char ch[5];   , 5 Bytes
double d; 8 Bytes

Using Turbo C++ also the same memory is needed. (Only int data type requirement is differ. Here no int members. So, no change in the requirement.)
struct B { A a; int arr[2][3];}b[3];
Memory requirements (Using Dev C++):

Variable

Memory requirement

A a; (Which is a structure variable) 25 Bytes
int arr[2][3]; 24 Bytes
b[3] which is a structure variable of structure B 49 Bytes for each element of b. So, Total requirement of b[3] is 147 Bytes.

Memory requirements (Using Turbo C++):

Variable

Memory requirement

A a; (Which is a structure variable) 25 Bytes
int arr[2][3]; 12 Bytes
b[3] which is a structure variable of structure B 37 Bytes for each element of b. So, Total requirement of b[3] is 111 Bytes.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 7.
Is the following snippet is fully correct. If not identify the error.
Answer:
struct sum1{ int n1,n2;}s1;
struct sum2{int n1,n2}s2;
cin>>s1.n1>>s1.n2;
s2=s1;
No. It is not fully correct. The following errors are there.
Errors:

Statement

Error

struct sum1 {int n1,n2;}sl; No Error
struct sum2 {int n1,n2}s2; Semicolon missing at the end of declaration statement;
cin>>s1.n1>>s1. n2; No Error
s2-s1; Objects of different structures can not be directly copied.

Question 8.
Differentiate array and structure.
Answer:
In any situation when more than one variable is required to represent objects of uniform data¬types, array can be used. If the elements are of different data types, then array cannot support. If more than one variable is used, they can be stored in memory but not in adjacent locations. It increases the time consumption while searching.

The structure provides a facility to store different data types as a part of the same logical element in one memory chunk adjacent to each other.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 9.
What are the different ways to initialize the structure members?
Answer:
Values can be assigned to structure elements similar to assigning values to variables.
Example:
Consider the following structure: struct Student
{
long int rollno;
int age;
float weight;
}
balu ;
We can initialize as given below:
balu.rollno= 702016;
balu. age=18; ‘
balu.weight= 48.5;
Also, values can be assigned directly as similar to assigning values to Arrays.
balu={702016, 18, 48.5};

Question 10.
What is wrong with the following C++ declarations?
Answer:
A. struct point ( double x, y)
B. struct point { double x, double y >;
C. struct point { double x; double y >
D. struct point { double x; double y; };
E. struct point { double x; double y; >

Errors:
A. struct point (double x, y)
Structure definition must be terminated with;. It is missing. Members must be enclosed in { }. So it may be written as
struct point { double x, y };

B. struct point {double x, double y>;
Structure member declaration must be terminated with; It is missing. So, it may corrected as
struct point {double x; double y;>; or struct point {double x, y;>;

C. struct point {double x; double y>
Structure member declaration and definition must be terminated with ; It is missing. So, it may corrected as
struct point {double x; double y;>; or
struct point { double x, y; >;

D. struct point {double x; double y;};,
No error .
E. struct point {double x; double y;>
– Structure definition must be terminated with ; it is missing. So, it may be corrected as
struct point {double x; double y;>;

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Part – III

Short Answers

Question 1.
How will you pass a structure to a function ?
Answer:
A structure variable can be passed to a function in a similar way of passing any argument that is of built-in data type,

  1. If the structure itself is an argument, then it is called “call by value”.
  2. If the reference of the structure is passed as an argument then it is called, “call by reference”.

Call by value
When a structure is passed as argument to a function using call by value method,any change made to the contents of the structure variable inside the function to which it is passed do not affect the structure variable used as an argument.

Call by reference
In this method of passing the structures to functions, the address of a structure variable / object is passed to the function using address of(&) operator. So any change made to the contents of structure variable inside the function are reflected back to the calling function.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 2.
The following code sums up the total of all students name starting with ‘S’ and display it. Fill in the blanks with required statements.
Answer:
struct student {int exam no, lang, eng, phy, che, mat, esc, total; char name[15];>;
int main( )
{
student s[20];
for(int i=0;i<20;i++)
{
…………………. //accept student details
}
for(int i=0;i<20;i++)
{
……………. //check for name starts with’ letter “S”
…………….. // display the detail of the checked name
}
return 0;
}
MODIFIED PROGRAM
using namespace std;
#include<iostream>
struct student
{
int exam_.no,lang,eng,phy,che,mat,esc,total; char name[15];
};
int main( )
{
student s[20];
for(int i=0;i<20;i++)
{
//accept student details
cout<<“\nEnter student name”;
cin>>s[i].name;
cout<<“\nEnter student exam number”;
cin>>s[i].exam_no;
cout<<“\nEnter Languge Mark”;
cin>>s[i].lang;
cout<<“\nEnter Engjish Mark”;
cin>>s[i].eng;
cout<<“\nEnter Physics Mark”;
cin>>s[i].phy;
cout<<“\nEnter Chemistry Mark”;
cin>>s[i].che;
cout<<“\nEnter Maths Mark”;
cin>>s[i].mat;
cout<<“\nEnter Computer Science Mark”;
cin>>s[i].csc;
s[i].total = s[i].lang + s[i].eng + s[i]. phy+s[i].che+s[i].mat+s[i]. csc;
}
cout<<“\nDetails of student name starts with letter S “<<endl;
for(int i=0;i<20;i++)
{
//check for name starts with letter “S” if(s[i].name[0] == ‘S’)
{
// display the detail of the checked name

cout<<“\nName : “<<s[i].
name<<“Total Mark”<<s[i].
total <<endl;
}
}
return 0;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 12

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 3.
What is called nested structure. Give example
Answer:
The structure declared- within another structure is called a nested structure.
Example:
struct Student
{
int age;
float height, weight;
struct dob
{
int date;
char month[4];
int year;
};
}mahesh;
The nested structures act as members of another structure and the members of the child structure can be accessed as parent structure name. Child structure name. Member name.
Example:
mahesh. dob. date
Here

  • mahesh is a parent structure name.
  • dob is a child structure name
  • date is a member of child structure

Question 4.
Rewrite the following program after removing the syntactical error(s), if any.
Answer:
Underline each correction.
struct movie
{
charm_name[10];
charm-Lang[10];
float ticket cost =50;};
Movie;
void main( )
{
gets(m_name);
cin>>m-lang;
return 0; ,
}
MODIFIED PROGRAM
PROGRAM (USING DEV C++)
#include<iostream>
#include<conio.h>
#include<stdio.h>
struct movie
{
char m_name[10];
char m_lang[10];
float ticket_cost;
} Movie;
int main( )
{
std::cout<<“\nEnter Move! Name ;
gets(Movie.m_name);
std::cout<<:”\nEnter Movie Language ,:
std: :cin>>Movie.m -lang;
std::cout<<“\nEnter Ticket Cost: “;
std::cin>>Movie.ticket_cost;
std::cout<<“\nMovie name is : “<
std::cout< <“\nMovie Language is : “<<Movie.m-lang;
std::cout<<“\nTicket cost is : “<<Movie.ticket_cost;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 13

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 5.
What ¡s the difference among the following two programs?
a) #include<iostream.h>
struct point
{
double x;
double y;
};
int main()
{
struct point test;
testx = .25; test.y = .75;
cout< <test.x< ctest.y;
return 0;
}
b) #include
struct .
{
double x;
double y;
} Point;
int main(void)
{
Point test={.25,.75>;
return 0;
}
Answer:
The method of structure initialisation is different.

Question 6.
How to access members of a structure? Give f example.
Answer:
Once the two objects of student structure type are declared, their members can be accessed directly. The syntax for that is using a dot (.) between the object name and the member name.
Syntax is :
Object name. Member

For example:
struct Student
{
longrollno;
int age;
float weight;
}balu, frank;
The elements of the structure Student can be accessed as follows: balu.rollno balu.age balu. weight frank, rollno frank.age frank.weight
balu.rollno
balu.age
balu.weight
frank.rollno
frank.age
frank.weight

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 7.
Write the syntax and an example for structure.
Answer:
Structure is declared using the keyword ‘struct’. The syntax of creating a structure is given below.
struct structure_name
{
type member_name1;
type member_name2;
} reference_name;
An optional field reference_name can be used to declare objects of the structure type directly.

Example:
struct Student
{
longrollno;
int age;
float weight;
}balu, frank;

Question 8.
For the following structure, definition writes the user-defined function to accept data through the keyboard.
struct date
{
int dd,mm,yy
};
struct item
{
int item id;
char name[10];
float price;
date date_manif;
}
Answer:
USER DEFINED FUNCTION
item accept( )
{
item obj;
cout<<“\n Enter Item Id “;
cin> > obj. item id;
cout<<“\nEnter Name “;
cin>obj.name;
cout<<“\nEnter Price “;
cin>>obj.price;
cout<<“\nEnter Date: date, month and year
cin>>obj.date_manif.dd >> obj.date_manif. mm >> obj.date_manif.yy;
return(obj);
}

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 9.
What is called an anonymous structure? Give an example.
Answer:
A structure without a name/tag is called anonymous structure, struct
{
long rollno;
int age;
float weight;
} student;
The student can be referred to as a reference name to the above structure and the elements can be accessed like
student, roll no
student.age and
student.weight.

Question 10.
Write a user-defined function to return the structure after accepting value through the keyboard. The structure definition is as follows:
struct Item{int item no;float price;};
Answer:
USER DEFINED FUNCTION
Item accept( )
{
Item obj; ,
cout<<‘AnEnter Item Number and Price “; cin>>obj.item_no>>obj, price.
return(obj);
}

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Part-IV

Explain in Detail

Question 1.
Explain the array of structures with examples.
Answer:
A class may contain many students. So, the definition of structure for one student can also be extended to all the students. If the class has 20 students, then 20 individual structures are required. For this purpose, an array of structures can be used.
An array of structures is declared in the same way as declaring an array with built-in data types like int or char.
The following program reads the details of 20 students and prints the same.
#include<iostream>
using namespace std;
struct Student
{
int age;
float height, weight;
char name[30];
};
void main()
{
Student std[20];
int i;
cout<< ” Enter the details for 20 students”<<endl;
for(i=0;i<20;i++)
{
cout<< ” Enter the details of student”<<i+1<<endl;
cout<< ” Enter the age:”<<endl; cin>>std[i].age;
cout<< “Enter the height:”<<endl; cin>>std[i].height;
cout<< “Enter the weight:”<<endl; cin>>std[i].weight;
}
cout<< “The values entered for Age, height and weight are”<<endl;
for(i=0;i<20;i++)
cout<< “Student “<<i+l<< “\t”< <std[i]. age<< “\t”<<std[i].height<< “\t”<<std[i]. weight;
}
Output
Enter the details of 20 students
Enter the details for student1
Enter the age:
18
Enter the height:
160.5
Enter the weight:
46.5
Enter the details for student2
Enter the age:
18
Enter the height:
164.5
Enter the weight:
61.5
………………………………….
…………………………
The values entered for Age, height and weight are
Student 1 18 160.5 46.5
Student 2 18 164.5 61.5
………………………

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 2.
Explain call by value with respect to structure.
Answer:
A structure variable can be passed to a function in a similar way of passing any argument that is of built-in data type. If the structure itself is an argument, then it is called “call by value”.

Call by value
When a structure is passed as argument to a function using call by value method,any change made to the contents of the structure variable inside the function to which it is passed do not affect the structure variable used as an argument.
Example:
#include<iostream>
using namespace std;
struct Employee
{
char name[50]; ,
int age;
float salary;
};
void printData(Employee); // Function declaration
int main( )
{
Employee p;
cout<< “Enter Full name: “;
cin>>p.name;
cout<< “Enter age: “;
cin>>p.age;
cout<< “Enter salary: “;
cin>>p.salary;
// Function call with structure variable as an argument
printData(p);
return 0;
}
void printData(Employee q)
{
cout<< “\nDisplaying Information.” <<endl;
cout<< “Name: ” << q.name <<endl;
cout<<“Age: ” <<q.age<<endl;
cout<< “Salary:” <<q.salary;
}
Output
Enter Full name: Kumar
Enter age: 55
Enter salary: 34233.4
Displaying Information.
Name: Kumar
Age: 55
Salary: 34233.4
In the above example, a structure named Employee is declared and used. The values that are entered into the structure are name, age and salary of a Employee are displayed using a function named printData( ).

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 3.
How call by reference is used to pass structure to a function .Give an Example
Answer:
Call by reference
In this method of passing the structures to functions ,the address of a structure variable / object is passed to the function using address of(&) operator. So any change made to the contents of structure variable inside the function are reflected back to the calling function
Example:
#include<iostream>
using namespace std;
struct Employee
{
char name[50];
int age;
float salary;
};
void readData(Employee &);
void printData(Employee);
int main()
{
Employee p;
readData(p);
printData(p);
return 0;
}
void readData(Employee &p)
{
cout<< “Enter Full name: “;
cin.get(p.name, 50);
cout<< “Enter age:
cin>>p.age; ,
cout<< “Enter salary:
cin>>p. salary;
}
void printData(Employee p)
{
cout<< “\nDisplaying Information.” <<endl;
cout<< “Name: ” << p.name <<endl;
cout<<“Age:” <<p.age<<endl;
cout<< “Salary:” <<p.salary;
}
Output
Enter Full name: Kumar
Enter age: 55
Enter salary: 34233.4
Displaying Information.
Name: Kumar
Age: 55
Salary: 34233.4
Structures are usually passed by reference method because it saves the memory space and executes faster.

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 4.
Write a C++ program to add two distances using the following structure definition
Answer:
struct Distance
{
int feet;
float inch;
}d1, d2, sum;
PROGRAM
#include<iostream>
using namespace std;
struct Distance
{
int feet;
float inch;
} d1, d2, sum;
int main( )
{
cout<<“\nEnter distance 1: feet and inch : “;
cin>>d1.feet>>d1.inch;
cout<<“\nEnter distance 2: feet and inch :
cin>>d2.feet>>d2.inch;
sum.feet = d1.feet + d2.feet;
sum.inch =(d1.inch + d2.inch) – (int) (d1.inch + d2,inch) / 12 * 12;
sum.feet = sum.feet + (d1.inch + d2.inch)/12;
cout<<“\nDitance 1: Feet = “<<d1.feet<<”
Inch = “<<d1.inch;
cout<<“\nDitance 2: Feet = “<<d2.feet<<”
Inch = “<<d2.inch;
cout<<“\nSum of Distance 1 and 2 : Feet = “<<sum.feet<<” Inch = “<<sum.inch;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 14

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 5.
Write a C++ Program to Add two Complex Numbers by Passing Structure to a Function for the following structure definition
Answer:
struct complex
{
float real;
float imag;
};
The prototype of the function is complex add Complex Numbers(complex, complex);
PROGRAM
#include<iostream>
using namespace std;
struct complex
{
float real;
float imag;
};
complex add Complex Numbers (complex obj1,complex obj2)
{
complex obj3;
obj3.real = obj1.reai+obj2,real;
obj3.imag = obj1.imag + obj2.imag;
return(obj3);
}
int main( )
{
complex c1,c2,c3;
cout<<“\nEnter First complex number real and imaginary :”;
cin>>c1,real>>c1.imag;
cout<<“\nEnter Second complex number real and imaginary :”;
cin>>c2.real>>c2.imag;
c3 = addComplexNumbers(c1,c2);
cout<<“\nFirst Complex Number is : “< }
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 15

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 6.
WrIte a C++ Program to declare a structure book containing name and author as character array of 20 elements each and price as Integer. Declare an array of book. Accept the name, author, price detail for each book. Define a user defined function to display the book details and calculate the total price. Return total price to the calling function.
Answer:
PROGRAM
using namespace std;
#include<iostream>
#include<iomanip>
#include<istdio.h>
struct book
{
char bname[20],author[20];
int price;
};
int display(book x[5])
{
int total;
for(int i=0;i<5;i++)
{
total = total + x[i].price;
cout<<“\nBook name : “<<x[i].
bname;
cout<<“\nAuthor name : “<<x[i].
author;
cout<<“\nPrice of the book: “<<x[i].
price;
}
return(total);C++C
}
int main( )
{
book. b[5];
for(int i=0;i<5;i++)
{
cout<<“\nEnter Book name “;
cin>>b[i].bname;
cout<<“\nEnter Author name “;
cin>>b[i].author;
cout<<“\nEnter Book Price “;
cin > > b[i]. price;
}
cout<<“\nDetails of Books”<<endl;
cout<<“\nTotal cost of the book is : Rs.”<<display(b);
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 16

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 7.
Write a C++ program to declare and accept an array of professors. Display the details of the department=”COMP.SCI” and the name of the professors start with ‘A’. The structure “college” should contain the following members.
prof-id as integer ,
name and Department as character array
Answer:
PROGRAM
using namespace std;
#include<iostream>
#include<iomanip>
#include<string.h>
struct college .
{
char pname[20],department[20]; int prof-id;
};
void display(college x[5])
{
for(int i=0;i<5;i++)
{
if((strcmp(x[i]. department,”COMP. SCI”)==0) && x[i].pname[0]==’A’)
cout<<x[i].pname«endl;
}
return;
}
int main( )
{
college c[5];
for(int i=0;i <5;i++)
{
cout<<“\nEnter Professor Name “;
cin>>c[i].pname; ,
cout<<“\nEnter Department Name “;
cin> >c[i] .department;
cout< <“\nEnter Professor Id
cin>>c[i].prof-id;
}
cout<<“\nDetails of Comp. Sci. . Dept, Professors whose name starts. with A “<<endl; . display(c);
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 17

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 8.
Write the output of the following C++ program
Answer:
#incluçle<iostream>
#include<stdio>
#include<string>
#include<conio>
using namespace std;
struct books
{
char name[20), author[20];
} a[50];
int main ( )
{
clrscr( );
cout<< “Details of Book No ” << 1 << “\n”;
cout<< “———————\n”;
cout<< ‘Book Name :”<<strcpy(a[0].
name,”Programming “)<<endl;
cout<< “Book Author :”<<strcpy(a[0].
author,”Dromy”)<<endl;
cout<< “\nDetails of Book No ” << 2 <<”\n”;
cout<< ” ——————- \n”;
cout<<- “Book Name :”<<strcpy(a[l].
name,”C++programming” )<<endl;
cout<< “Book Author :”<<strcpy(a[l].
author,”BjarneStroustrup “)< <endl;
cout<<“\n\n”;
cout<< “======================
============================
\n”; ‘
cout<< ” S.No\t| Book Name\t|author\n”;
cout<< “=======================
=============================
for (int i = 0; i < 2; i++)
{
cout<< “\n ” << i + 1 << “\t|” << a[i].name << “\t| ” << a[i],author;
}
cout<< “\n=========-==========
===========================
==”;
return 0;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 18

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 9.
Write the output of the following C++ program
Answer:
#include<iostream>
#include<string>
using namespace std;
struct student
{
introll_no;
char name[10];
long phone_number;
};
int main() .
{
student p1 = {1,”Brown”,123443};
student p2, p3;
p2.roll_no = 2;
strcpy(p2.name,”Sam”);
p2.phone_number = 1234567822;
p3.roll_no = 3;
strcpy(p3.name,”Addy”);
p3.phone_number = 1234567844;
cout<< “First Student” <<endl;
cout<< “roll no : ” << p1.roll_no <<endl;
cout<< “name : ” << p1.name <<endl;
cout<< “phone no ; ” << p1.phone_number <<endl;
cout<< “Second Student” <<endl;
cout<< “roll no : ” << p2.roll_no <<endl;
cout<< “name : ” << p2.name <<endl;
cout<< “phone no : ” << p2.phone_number <<endl;
cout<< “Third Student” <<endl;
cout<< “roll no : ” << p3.roll_no <<endl;
cout<< “name : ” << p3.name <<endl;
cout<< “phone no : ” << p3.phone_number <<endl;
return0;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 19

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 10.
Debug the error in the following program.
Answer:
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 20
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 21
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 22
MODIFIED PROGRAM
#include<iostream.h>
struct PersonRec
{
char lastName[10];
char firstName[10];
int age;
}
Person Rec PeopleArrayType[ 10];
void LoadArray(PeopleRec peop[10]);
void main( )
{
PersonRec people [10];
for (i = 0; i < 10; i++)
{
cout< < people[i].firstName< < ” <<peopie[i].lastName <<setw(10) <<people[i].age;
}
}
LoadArray(PersonRec peop[10])
{
for (int i = 0; i < 10; i++)
{
cout<< “Enter first name: “;
cin<<peop[i].firstName;
cout<< “Enter last name: “;
cin>>peop[i].lastName;
cout<< “Enter age: “;
cin>> peop[i].age;←
}

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

11th Computer Science Guide Arrays and Structures Additional Questions and Answers

Choose The Correct Answer 1 mark

Question 1.
…………….. is a user-defined which has the combination of data items with different data types.
a) Structure
b) Class
c) Union
d) Array
Answer:
a) Structure

Question 2.
…………………. allows to group of variables of mixed data types together into a single unit.
a) Structure
b) Class
c) Union
d) Array
Answer:
a) Structure

Question 3.
If the elements are of different data types,then ……………… cannot support.
a) Structure
b) Class
c) Union
d) Array
Answer:
d) Array

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 4.
Structure is declared using the keyword …………………
a) Structure
b) struct
c) Stru
d) STRUCT
Answer:
b) struct

Question 5.
Identify the structure name from the following; struct Student balu;
a) balu
b) struct
c) Student
d) None of these
Answer:
c) Student

Question 6.
Identify the structure variable (object) from the following: struct Student balu;
a) balu
b) struct
c) Student
d) None of these
Answer:
a) balu

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 7.
How much of memory is required for the object of the following structure in Dev C++.
struct Student
{
long rollno;
int age;
float weight;
}balu, frank;
a) 12 Bytes
b) 8 Bytes
c) 10 Bytes
d) None of these
Answer:
a) 12 Bytes

Question 8.
How much of memory is required for the object of the following structure in Turbo C++.
struct Student
{
long rollno;
int age;
float weight;
}balu, frank;
a) 12 Bytes
b) 8 Bytes
c) 10 Bytes
d) None of these
Answer:
c) 10 Bytes

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 9.
If the members are pointer types then ……………….. is used to access the structure members.
a) →
b) ←
c) .(dot)
d) None of these
Answer:
a) →

Question 10.
A structure without a …………….. is called an anonymous structure.
a) Name
b) Tag
c) Name/Tag
d) None of these
Answer:
c) Name/Tag

Question 11.
…………………… operator is used to accessing structure member.
a) ::
b) @
c) .(dot)
d) $
Answer:
c) .(dot)

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 12.
The structure declared within another structure is called a …………….. structure.
a) Nested
b) Group
c) Block
d) None of these
Answer:
a) Nested

Question 13.
……………. structures act as members of another structure.
a) Nested
b) Group
c) Block
d) None of these
Answer:
a) Nested

Question 14.
The members of the child structure can be accessed as …………………….
a) Child structure name. Parent structure name. Member name
a) Parent structure name. Child structure name. Member name
a) Parent structure name. Member name. Child structure name
a) Member name. Parent structure name. Child structure name
Answer:
a) Child structure name. Parent structure name. Member name

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 15.
A structure variable can be passed to a function in a similar way of passing any argument that is of ……………………. data type.
a) Derived
b) User-defined
c) Built-in
d) None of these
Answer:
c) Built-in

Question 16.
If the structure itself is an argument to a function, then it is called ………………..
a) Call by value
b) Call by Reference
c) Call by Expression
d) None of these
Answer:
a) Call by value

Question 17.
If the reference of the structure is passed as an argument then it is called ……………….
a) Call by value
b) Call by Reference
c) Call by Expression
d) None of these
Answer:
b) Call by Reference

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 18.
When a structure is passed as an argument to a function using ……………… method, any change made to the contents of the structure variable inside the function to which it is passed do not affect the structure variable used as an argument.
a) Call by value
b) Call by Reference
c) Call by Expression
d) None of these
Answer:
a) Call by value

Question 19.
In ……………….method of passing the structures to functions, any change made to the contents of structure variable inside the function are reflected back to the calling function.
a) Call by value
b) Call by Reference
c) Call by Expression
d) None of these
Answer:
b) Call by Reference

Question 20.
Structures are usually passed by reference method because ……………..
a) It saves the memory space
b) Executes faster
c) Both A and B
d) None of these
Answer:
c) Both A and B

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 21.
Identify the correct statement from the following.
a) A structured object can also be assigned to another structure object only if both the objects are of the same structure type.
b) The structure elements can be initialized either by using separate assignment statements or at the time of declaration by surrounding its values with braces.
c) Array of structure variable can also be created.
d) All the above
Answer:
d) All the above

Very Short Answers (2 Marks)

Question 1.
What is the drawback of an array?
Answer:
In any situation when more than one variable is required to represent objects of uniform data-types, array can be used. If the elements are of different data types, then array cannot support.
If more than one variable is used, they can be stored in memory but not in adjacent locations. It increases the time consumption while searching.

Question 2.
What is the advantage of structure?
Answer:
The structure provides a facility to store different data types as a part of the same logical element in one memory chunk adjacent to each other.

Question 3.
What are global objects?
Answer:
Objects declared along with structure definition are called global objects

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 4.
Write note on the anonymous structure.
Answer:
A structure without a name/tag is called an anonymous structure.

Example:
struct
{
long rollno;
int age;
float weight;
} student;
The student can be referred to as a reference name to the above structure and the elements can be accessed like a student, roll no, student.age and student.weight

Question 5.
Define Nested structure.
Answer:
The structure declared within another structure is called a nested structure.

Question 6.
Give an example of nested structure.
Answer:
struct Student
{
int age;
float height, weight;
struct dob
{
int date;
char month[4];
int year;
};
}mahesh;

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 7.
How to access nested member structure?
Answer:
The nested structures act as members of another structure and the members of the child structure can be accessed as
parent structure name. Child structure name. Member name
Example:
mahesh. dob. date

Short Answers 3 Marks

Question 1.
Write the syntax of defining a structure? Give an example.
Answer:
Structure is declared using the keyword ‘struct’. The syntax of creating a structure is given below.
struct structure_name
{
type member-name1;
type member_name2;
} reference_name;
An optional field reference_name can be used to declare objects of the structure type directly.
Example:
struct Student
{
long rollno;
int age;
float weight;
};

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Question 2.
How memory is allocated for a structure?
Answer:
Consider the following structure :
struct Student
{
long rollno;
int age;
float weight;
};
In the above declaration of the struct, three variables rollno, age and weight are used. These variables (data element) within the structure are called members (or fields). In order to use the Student structure, a variable of type Student is declared and the memory allocation is shown in the following figure.
Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures 23

Question 3.
How will you refer structure elements?
Answer:
Referencing Structure Elements
Once the two objects of student structure type are declared, their members can be accessed directly.
The syntax for that is using a dot (.) between the object name and the member name. For example, the elements of the structure Student can be accessed as follows:
balu.rollno
frank, rollno
balu.age
frank.age
balu.weight
frank.weight

Samacheer Kalvi 11th Computer Science Guide Chapter 12 Arrays and Structures

Explain In Detail 5 Marks

Question 1.
Explain structure assignments in detail.
Answer:
Structure Assignments
Structures can be assigned directly instead of assigning the values of elements individually.
Example:
If Mahesh and Praveen are same age and same height and weight then the values of Mahesh can be copied to Praveen struct Student
{
int age;
float height, weight;
}mahesh;
The age of Mahesh is 17 and the height and weights are 164.5 and 52.5 respectively.The following statement will perform the assignment.
mahesh = {17, 164.5, 52.5};
praveen = mahesh;
will assign the same age, height and weight to Praveen.

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Tamilnadu State Board New Syllabus Samacheer Kalvi 11th Computer Science Guide Pdf Chapter 11 Functions Text Book Back Questions and Answers, Notes.

Tamilnadu Samacheer Kalvi 11th Computer Science Solutions Chapter 11 Functions

11th Computer Science Guide Functions Text Book Questions and Answers

Book Evaluation

Part I

Choose The Correct Answer

Question 1.
Which of the following header file defines the standard I/O predefined functions ?
a) stdio.h
b) math.h
c) string.h
d) ctype.h
Answer:
a) stdio.h

Question 2.
Which function is used to check whether a character is alphanumeric or not ?
a) isalpha( )
b) isdigit( )
c) isalnum( )
d) islower( )
Answer:
c) isalnum( )

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 3.
Which function begins the program execution ?
a) isalpha( )
b) isdigit( )
c) main( )
d) islower( )
Answer:
c) main( )

Question 4.
Which of the following function is with a return value and without any argument ?
a) x=display(int/ int)
b) x=display( )
c) y=display(float)
d) display(int)
Answer:
b) x=display( )

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 5.
Which is return data type of the function prototype of add (int, int); ?
a) int
b) float
c) char
d) double
Answer:
a) int

Question 6.
Which of the following is the scope operator ?
a) >
b) &
c) %
d) ::
Answer:
d) ::

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Part – II

Very Short Answers

Question 1.
Define Functions.
Answer:
A large program can typically be split into small subprograms (blocks) called functions where each sub-program can perform some specific functionality. Functions reduce the size and complexity of a program, make it easier to understand, test, and check for errors.

Question 2.
Write about strlen() function.
Answer:
The strlen() takes a null-terminated byte string source as its argument and returns its length. The length does not include the null(\0) character.
Example:
char source[ ] = “Computer Science”;
cout<<“\nGiven String is “<<source<<” its Length is “<<strlen(source);
Output
Given String is Computer Science its Length is 16

Question 3.
What are the importance of void data type?
Answer:
void type has two important purposes:

  1. To indicate the function does not return a value.
  2. To declare a generic pointer.

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 4.
What is Parameter and list its types?
Answer:
Arguments or parameters are the means to pass values from the calling function to the called function.
Types:

  1. The variables used in the function definition as parameters are known as formal parameters.
  2. The constants, variables, or expressions used j in the function call are known as actual parameters.

Question 5.
Write a note on Local Scope.
Answer:

  1. A local variable is defined within a block. A block of code begins and ends with curly braces { }.
  2. The scope of a local variable is the block in which it is defined.
  3. A local variable cannot be accessed from outside the block of its declaration.
  4. A local variable is created upon entry into its block and destroyed upon exit

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Part – III

Short Answers

Question 1.
What is Built-in functions?
Answer:
The functions which are available by default are known as “Built-in” functions. Ready-to-use subprograms are called pre-defined functions or built-in functions.

Question 2.
What is the difference between isupper() and toupper() functions?
Answer:
isupper():

  • This function is used to check the given character is uppercase.
  • This function will return 1 if true otherwise 0.

toupper():

  • This function is used to convert the given character into its uppercase.
  • This function will return the upper case equivalent of the given character. If the given character itself is in upper case, the output will be the same.

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 3.
Write about strcmp( ) function.
Answer:
strcmp( )
The strcmp( ) function takes two arguments: string 1 and string2. It compares the contents of string 1 and string2 lexicographically.
The strcmp() function returns a:

  • Positive value if the first differing character in string 1 is greater than the corresponding character in string2. (ASCII values are compared)
  • Negative value if the first differing character in string 1 is less than the corresponding character in string2,
  • 0 if string1 and string2 are equal.

Example:
#include <string.h>
#include <iostream>
using namespace std;
int main()
{
char string1[ ] = “Computer”;
char string2[ ] = “Science”;
int result;
result = strcmp(string1,string2);
if(result==0)
{
cout<<“String1 : “<<string1<<” and String2 : “<<string2 <<“Are Equal”;
}
else
{
cout<<“String1 :”<<string1<<” and String2 : “<<string2’ <<“ Are Not Equal”;
}
}
Output
String1 : Computer and String2 : Science Are Not Equa1

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 4.
Write short note on pow( ) function in C++.
Answer:
pow( ) function:
The pow( ) function returns base raised to the power of exponent. If any argument passed to pow( ) is long double, the return type is promoted to long double. If not, the return type is double.
The pow( ) function takes two arguments:

  • base – the base value
  • exponent – exponent of the base

#include <iostream>
#include <math.h>
using namespace std;
int main ( )
{
double base, exponent, result;
base = 5;
exponent = 4;
result = pow(base, exponent);
cout << “pow(“< double x = 25;;
result = sin(x);
cout << “\nsin(“<<x<<“)= “<<result;
return 0;
}
Output
pow(5^4) = 625
sin(25) = -0.132352

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 5.
What are the information the prototype provides to the compiler?
Answer:
The prototype above provides the following information to the compiler:

  1. The return value of the function is of type long.
  2. Fact is the name of the function.
  3. The function is called with two arguments:
    • The first argument is of int data type.
    • The second argument is of double data type, int display(int, int) // function prototype//.

The above function prototype provides details about the return data type, name of the function and a list of formal parameters or arguments.

Question 6.
What is default arguments ? Give example.
Answer:
default arguments:
In C++, one can assign default values to the formal parameters of a function prototype. The default arguments allows to omit some arguments when calling the function.

When calling a function,
For any missing arguments, complier uses the values in default arguments for the called function.
The default value is given in the form of variable initialization.

Example:
void defaultvalue(int n1=10, n2=100);
The default arguments facilitate the function call statement with partial or no arguments or complete arguments.

Example:
defaultvalue(x,y);
defaultvalue(200,150);
defaultvalue(150);
defaultvalue( );
The default values can be included in the function prototype from right to left, i.e., we cannot have a default value for an argument in between the argument list.

Example:
void defaultvalue(int n1 = 10, n2);//invalid prototype
void defaultvalue(int n1, n2 = 10);//valid prototype

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Part – IV

Explain in Detail

Question 1.
Explain the Call by value method with a suitable example.
Answer:
Call by value method:
This method copies the value of an actual parameter into the formal parameter of the function. In this case, changes made to the formal parameter within the function will have no effect on the actual parameter.

Example:
#include <iostream>
using namespace std;
void display(int x)
{
int a = x * x;
cout<<“\n\nThe Value inside display function
(a * a):”<<a;
}
int main( )
{
int a;
cout<<“\nExample : Function call by value:”;
cout<<“\n\nEnter the Value for A cin>>a;
display(a);
cout<<”\n\nThe Value inside main function “<<a;
return (0);
}
Output:
Example: Function call by value Enter the Value for A : 5
The Value inside display function (a * a) : 25
The Value inside main function 5

Question 2.
What is Recursion? Write a program to find GCD using recursion.
Answer:
A function that calls itself is known as a recursive function. And, this technique is known as recursion.

Finding GCD of any to number using Recursion:
GCD – Greatest Common Divisor or HCF (Highest Common Factor) or GCM – Greatest Common Measure)
#include <iostream>
using namespace std;
//Function to find HCF or GCD OR GCM // int gcd(int n1, int n2)
{
if (n2 != 0)
return gcd(n2, n1 % n2); //Recursive call of gcd function
else
return n1;
}
int main( )
{
int num1, num2;
cout << “Enter two positive integers: “;
cin >> num1 >> num2;
cout << “Greatest Common Divisor (GCD) of ” << num1;
cout<< ” & ” << num2 << ” is: ” << gcd(num1, num2);
return 0;
}
Output :
Enter two positive integers: 350 100
Greatest Common Divisor (GCD) of 350 & 100 is: 50

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 3.
What are the different forms of function return? Explain with example.
Answer:
Different forms of User-defined Function declarations:
Function without return value and without parameter
The following program is an example of a function with no return and no arguments passed.
The name of the function is display( ), its return data type is void and it does not have any argument.
#include <iostream>
using namespace std;
void display( )
{
cout<<“Function without parameter and return value”;
}
int main()
{
display( ); // Function calling statement//
return(O);
}
Output :
Function without parameter and return value
A Function with return value and without parameter
The name of the function is display(), its return type is int and it does not have any argument. The return statement returns a value to the calling function and transfers the program control back to the calling statement.

#include <iostream>
using namespace std;
int display( )
{
int a, b, s;
cout<<“Enter 2 numbers:
cin>>a>>b;
s=a+b;
return s;
}
int main( )
{
int m=display( );
cout<<“\nThe Sum=”<<m;
return(0);
}
OUTPUT :
Enter 2 numbers: 10 30
The Sum = 40

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 4.
Explain scope of variable with an example.
Answer:
Scope refers to the accessibility of a variable.
There are four types of scopes in C++

  1. Local Scope
  2. Function Scope
  3. File Scope
  4. Class Scope

1. Local Scope:

  • A local variable is defined within a block. A block of code begins and ends with curly braces {}.
  • The scope of a local variable is the block in which it is defined.
  • A local variable cannot be accessed from outside the block of its declaration.
  • A local variable is created upon entry into its block and destroyed upon exit;

Example:
int main( )
{
int a,b;   //Local variable
}

2. Function Scope:

  • The scope of a variable within a function is extended to the function block and all sub-blocks therein.
  • The lifetime of a function scope variable is the lifetime of the function block.

Example:
int. sum(int x, int y);  //x and y has function scope.

3. File Scope:

  • A variable declared above all blocks and functions (including main()) has the scope of a file.
  • The lifetime of a file scope variable is the lifetime of a program.
  • The file scope variable is also called a global variable.

Example:
#include
using namespace std;
int x,y; //x and y are global variable
void main()
{
……..
}

4. Class Scope:

  • Data members declared in a class has the class scope.
  • Data members declared in a class can be accessed by all member functions of the class.

Example:
Class example
{
int x,y; //x and y can be accessed by print() and void():
void print();
Void total();
};

Class Scope:
A class is a new way of creating and implementing a user-defined data type. Classes provide a method for packing together data of different types.
Data members are the data variables that represent the features or properties of a class.

class student
}
private:
int mark1, mark2, total;
};
The class student contains mark1, mark2, and total are data variables. Its scope is within the class of students only.

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 5.
Write a program to accept any integer number and reverse it.
Answer:
PROGRAM:
using namespace std;
#include <iostream>
int reverse(int num)
{
int r=0,d;
while(num>0)
{
d = num%10;
r = r*10+d;
num = num/10;
}
return (r);
}
int main( )
{
intx;
cout<<“\nEnter a number”;
cin>>x;
cout<<“\nReverse of the number is “<<reverse(x);
return 0;
}
OUTPUT
Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions 1

11th Computer Science Guide Functions Additional Questions and Answers

Choose The Correct Answer 1 Mark

Question 1.
………………. is the name of the function.
(a) Predefined
(b) Built-in
(c) Library
(d) All the above
Answer:
(d) All the above

Question 2.
…………….. reduce the size and complexity of a program, makes it easier to understand, test, and check for errors.
a) Arrays
b) Functions
c) Structures
d) Unions
Answer:
b) Functions

Question 3.
The strcpy() function takes two arguments of ……………….
(a) target and source
(b) upper and lower
(c) base and exponent
(d) none of these
Answer:
(a) target and source

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 4.
Functions which are available in the C++ language standard library is known as ……………… functions.
a) Built-in
b) User-defined
c) Either A or B
d) None of these
Answer:
a) Built-in

Question 5.
The pow() function takes the two arguments of ……………….
(a) target and source
(b) upper and lower
(c) base and exponent
(d) source and exponent
Answer:
(c) base and exponent

Question 6.
Why functions are needed?
a) Divide and conquer the purpose
b) Reusability of code
c) Reduce the complexity of a program
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 7.
The C++ program always has a main() function to begin the program execution.
(a) 1
(b) 2
(c) 3
(d) null
Answer:
(a) 1

Question 8.
Ready-to-use subprograms are called ………………..
a) Pre-defined functions
b) Built-in functions
c) Either A or B
d) None of these
Answer:
c) Either A or B

Question 9.
In C++ the arguments can be passed to a function in ………………. ways.
(a) 2
(b) 1
(c) 3
(d) 7
Answer:
(a) 2

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 10.
A header file can be identified by their file extension ……………..
a) .head
b) .h
c) .hf
d) None of these
Answer:
b) .h

Question 11.
…………… is a header file contains pre-defined standard input/output functions.
a) conio.h
b) istream.h
c) iostream.h
d) stdio.h
Answer:
d) stdio.h

Question 12.
stdio.h header file defines the standard I/O predefined function ……………
a) getchar()
b) putchar()
c) getsQ and puts()
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 13.
The predefined function ……………. is used to get a single character from the keyboard.
a) getchar()
b) putchar()
c) gets() and puts()
d) puts()
Answer:
a) getchar()

Question 14.
The predefined function …………… is used to display a single character.
a) getchar( )
b) putchar( )
c) gets( )
d) puts( )
Answer:
b) putchar( )

Question 15.
Function ……………… reads a string from standard input and stores it into the string pointed by the variable.
a) getchar( )
b) putchar( )
c) gets( )
d) puts( )
Answer:
c) gets( )

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 16.
Function …………….. prints the string read by gets() function in a newline.
a) getchar( )
b) putchar( )
c) gets( )
d) puts( )
Answer:
d) puts( )

Question 17.
……………. header file defines various operations on characters.
a) conio.h
b) ctype.h
c) iostream.h
d) stdio.h
Answer:
b) ctype.h

Question 18.
……………… function is used to check whether a character is alphanumeric or not.
a) isalnum( )
b) isalpha( )
c) isdigit( )
d) None of these
Answer:
a) isalnum( )

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 19.
………….. function returns a non-zero value if the given character is a digit or a letter, else it returns 0.
a) isalnum( )
b) isaipha( )
c) isdigit( )
d) None of these
Answer:
a) isalnum( )

Question 20.
The ……………… function is used to check whether the given character is an alphabet or not.
a) isalnum( )
b) isalpha( )
c) isdigit( )
d) None of these
Answer:
b) isalpha( )

Question 21.
………….. function will return 1 if the given character is an alphabet, and 0 otherwise 0.
a) isalnum( )
b) isalpha( )
c) isdigit( )
d) None of these
Answer:
b) isalpha( )

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 22.
………… function is used to check whether a given character is a digit or not.
a) isalnum( )
b) isalpha( )
c) isdigit( )
d) None of these
Answer:
c) isdigit( )

Question 23.
……………. function will return 1 if the given character is a digit, and 0 otherwise.
a) isalnum( )
b) isalpha( )
c) isdigit( )
d) None of these
Answer:
c) isdigit( )

Question 24.
………………. function is used to check whether a character is in lower case (small letter) or not.
a) islower( )
b) tolower( )
c) Both A and B
d) None of these
Answer:
a) islower( )

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 25.
……………. functions will return a non-zero value if the given character is a lower case alphabet, and 0 otherwise.
a) islower( )
b) tolower( )
c) toupper( )
d) isupper( )
Answer:
a) islower( )

Question 26.
……………. function is used to check the given character is uppercase.
a) islower( )
b) tolower( )
c) toupper( )
d) isupper( )
Answer:
d) isupper( )

Question 27.
……………. function will return 1 if the given character is an uppercase alphabet otherwise 0.
a) islower( )
b) tolower( )
c) toupper( )
d) isupper( )
Answer:
d) isupper( )

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 28.
…………. function is used to convert the given character into its uppercase.
a) islower( )
b) tolower( )
c) toupper( )
d) isupper( )
Answer:
c) toupper( )

Question 29.
………….. function will return the upper case equivalent of the given character.
a) islower( )
b) tolower( )
c) toupper( )
d) isupper( )
Answer:
c) toupper( )

Question 30.
………………… function is used to convert the given character into its lowercase.
a) islower( )
b) tolower( )
c) toupper( )
d) isupper( )
Answer:
b) tolower( )

Question 31.
………………. function copies the character string pointed by the source to the memory location pointed by the target.
a) strcpy( )
b) strcat( )
c) strcmp( )
d) strlen( )
Answer:
a) strcpy( )

Question 32.
The …………………. function takes a null-terminated byte string source as its argument and returns its length.
a) strcpy( )
b) strcat( )
c) strcmp( )
d) strlen( )
Answer:
d) strlen( )

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 33.
The length of the string does not include the _______ character.
a) Null(\0)
b) Blank space
c) White space
d) None of these
Answer:
a) Null(\0)

Question 34.
………………. function compares the contents of string1 and string2 lexicographically.
a) strcpy( )
b) strcat( )
c) strcmp( )
d) strlen( )
Answer:
c) strcmp()

Question 35.
The Strcmp( ) function returns a ………………. value if the first differing character in string1 is greater than the corresponding character in string2.
a) Positive
b) Negative
c) Zero
d) None of these
Answer:
a) Positive

Question 36.
The Strcmp() function returns a …………….. value if the first differing character in stringl is less than the corresponding character in string2.
a) Positive
b) Negative
c) Zero
d) None of these
Answer:
b) Negative

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 37.
………………. function appends copy of the character string pointed by the source to the end of string pointed by the target.
a) strcpy( )
b) strcat( )
c) strcmp( )
d) strlen( )
Answer:
b) strcat( )

Question 38.
The …………….. function is used to convert the given string into Uppercase letters.
a) strupr( )
b) toupper( )
c) Both A and B
d) None of these
Answer:
a) strupr( )

Question 39.
The …………….. function is used to convert the given string into Lowercase letters.
a) tolower( )
b) strlwr( )
c) Both A and B
d) None of these
Answer:
b) strlwr( )

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 40.
The cos( ) function takes a single argument in ………………
a) Radians
b) Degree
c) Either A or B
d) None of these
Answer:
a) Radians

Question 41.
The cos( ) function returns the value in the range of ……………
a) [0, 1]
b) [-1, 1]
c) [1,-1]
d) None of these
Answer:
b) [-1, 1]

Question 42.
The cos( ) function returns the value in ……………….
a) double
b) float
c) long double
d) Either A or B or C
Answer:
d) Either A or B or C

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 43.
The sqrt( ) function takes a …………… argument.
a) single non-negative
b) single negative
c) double non-negative
d) double negative
Answer:
a) single non-negative

Question 44.
If a negative value is passed as an argument to sqrt( ) function, a …………….. occurs,
a) Data type mismatch
b) Domain error
c) Prototype mismatch
d) None of these
Answer:
b) Domain error

Question 45.
The ………….. function returns, the value in the range of [-1,1].
a) cos( )
b) sin( )
c) Both A and B
d) None of these
Answer:
c) Both A and B

Question 46.
The …………….. function returns base raised to the power of the exponent.
a) exponent( )
b) power( )
c) pow( )
d) None of these
Answer:
c) pow( )

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 47.
If any argument passed to pow() is long double, the return type is promoted to ……………..
a) long double
b) int
c) double
d) char
Answer:
a) long double

Question 48.
The pow( ) function takes ……………… argument.
a) base
b) exponent
c) Both A and B
d) None of these
Answer:
c) Both A and B

Question 49.
The …………….. function in C++ seeds the pseudo-random number generator used by the rand() function.
a) srand( )
b) sran( )
c) rands( )
d) None of these
Answer:
a) srand( )

Question 50.
The srand( ) function is defined in ……………. header file.
a)
b) <stdlib)h>
c) or<stalib)h>
d) None of these
Answer:
c) or<stalib)h>

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 51.
C++ program can contain ……………. main”() function.
a) Only one
b) No
c) More than one
d) None of these
Answer:
a) Only one

Question 52.
In C++,……………… function begins the program execution.
a) void
b) main( )
c) User-defined
d) Built-in
Answer:
b) main( )

Question 53.
………………. data type is used to indicate the function does not return a value.
a) int
b) double
c) void
d) unsigned
Answer:
c) void

Question 54.
……………… data type is used to declare a generic pointer.
a) int
b) double
c) void
d) unsigned
Answer:
c) void

Question 55.
The user-defined function should be called explicitly using its ………………
a) Name
b) Arguments to be passed
c) Both A and B
d) None of these
Answer:
c) Both A and B

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 56.
Which of the following calling the function have a return value and with arguments?
a) display( );
b) display(x,y);
c) x = display( );
d) x = display(x,y);
Answer:
d) x = display(x,y);

Question 57.
Which of the following calling function have no return value and no argument?
a) display( );
b) display(x,y);
c) x = display();
d) x = display(x,y);
Answer:
a) display( );

Question 58.
Which of the following calling the function have no return value and with arguments?
a) display( );
b) display(x,y);
c) x = display();
d) x = display(x,y);
Answer:
b) display(x,y);

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 59.
Which of the following calling the function have a return value and no argument?
a) display();
b) display(x,y);
c) x = display();
d) x = display(x,y);
Answer:
c) x = display();

Question 60.
…………………. are the means to pass values from the calling function to the called function.
a) Arguments
b) Parameters
c) Arguments or Parameters
d) None of these
Answer:
c) Arguments or Parameters

Question 61.
The variables used in the function definition as parameters are known as ……………. parameters.
a) Formal
b) Actual
c) Ideal
d) None of these
Answer:
a) Formal

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 62.
The parameters used in the function call are known as ………………. parameters.
a) Formal
b) Actual
c) Ideal
d) None of these
Answer:
b) Actual

Question 63.
The ……………… can be used in the function call as parameters.
a) Constants
b) Variables
c) Expressions
d) All the above
Answer:
d) All the above

Question 64.
The …………….. arguments allow omitting some arguments when calling the function.
a) Default
b) Actual
c) Formal
d) None of these
Answer:
a) Default

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 65.
The default value is given in the form of …………………….
a) Variable declaration
b) Variable initialization
c) void
d) None of these
Answer:
b) Variable initialization

Question 66.
The default arguments facilitate the function call statement with ………………. arguments.
a) Partial
b) No
c) Complete
d) All the above
Answer:
d) All the above

Question 67.
The default values can be included in the function prototype from ……………….
a) Left to Right
b) Right to Left
c) Center to Left
d) None of these
Answer:
b) Right to Left

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 68.
The constant variable can be declared using the…………… keyword.
a) constant
b) Const
c) const
d) CONST
Answer:
c) const

Question 69.
The …………….. keyword makes variable value stable.
a) constant
b) Const
c) const
d) CONST
Answer:
c) const

Question 70.
The ……………… modifier enables to assign an initial value to a variable that cannot be changed later inside the body of the function,
a) void
b) Const
c) const
d) Unsinged
Answer:
c) const

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 71.
In C++, the arguments can be passed to a function in ……………. ways.
a) three
b) two
c) four
d) None of these
Answer:
b) two

Question 72.
In C++, the arguments can be passed to a function in ……………… method.
a) Call by value
b) Call by reference
c) Either A or B
d) None of these
Answer:
c) Either A or B

Question 73.
………………. method copies the value of an actual parameter into the formal parameter of the function.
a) Call by value
b) Call by reference
c) Either A or B
d) None of these
Answer:
a) Call by value

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 74.
In ……………. method, changes made to the formal parameter within the function will have no effect on the actual parameter.
a) Call by value
b) Call by reference
c) Either A or B
d) None of these
Answer:
a) Call by value

Question 75.
………… method copies the address of the actual argument into the formal parameter.
a) Call by value
b) Call by reference
c) Either A or B
d) None of these
Answer:
b) Call by reference

Question 76.
In the…………….. method, any change made in the formal parameter will be reflected back in the actual parameter.
a) Call by value
b) Call by reference
c) Either A or B
d) None of these
Answer:
b) Call by reference

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 77.
The definition of the functions is stored in …………….
a) Array
b) Call by reference
c) Structures
d) None of these
Answer:
b) Call by reference

Question 78.
………….. functions can be used to reduce the overheads like STACKS for small function definition.
a) Inline
b) Built-in
c) User-defined
d) None of these
Answer:
a) Inline

Question 79.
……………. reduces the speed of program execution.
a) Array
b) Stacks
c) Structures
d) Unions
Answer:
b) Stacks

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 80.
A(n) ………….. function looks like a normal function in the source file but inserts the function’s code directly into the calling program.
a) inline
b) Built-in
c) User-defined
d) None of these
Answer:
a) inline

Question 81.
To make a function inline, one has to insert the keyword …………….. in the function header.
a) Inline
b) Insert
c) INLINE
d) None of these
Answer:
a) Inline

Question 82.
……………. functions execute faster but require more memory space.
a) User-defined
b) Built-in
c) Inline
d) None of these
Answer:
c) Inline

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 83.
The inline function reduces the complexity of using …………………
a) Array
b) Stacks
c) Structures
d) Unions
Answer:
b) Stacks

Question 84.
Returning from the function is done by using the ……………… statement.
a) return
b) goto
c) break
d) continue
Answer:
a) return

Question 85.
The …………….. statement stops execution and returns to the calling function.
a) return
b) goto
c) break
d) continue
Answer:
a) return

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 86.
Identify the true statement from the following.
a) A return may or may not have a value associated with it.
b) If the return has a value associated with it, that value becomes the return value for the calling statement.
c) The return statement is used to return from a function.
d) AN the above
Answer:
d) AN the above

Question 87.
The functions that return no value are declared as ……………..
a) Null
b) void
c) Empty
d) None of these
Answer:
b) void

Question 88.
The data type of a function is treated as …………….. if no data type is explicitly mentioned.
a) Null
b) void
c) Empty
d) int
Answer:
d) int

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 89.
What is the return type of the following function prototype? add (int, int);
a) Null
b) void
c) Empty
d) int
Answer:
d) int

Question 90.
What is the return type of the following function prototype? double add (int, int);
a) float
b) void
c) double
d) int
Answer:
c) double

Question 91.
What is the return type of the following function prototype?
char *display();
a) float
b) string
c) double
d) char
Answer:
b) string

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 92.
A function that calls itself is known as ………….. function.
a) recursive
b) nested
c) invariant
d) variant
Answer:
a) recursive

Question 93.
A function that calls itself using …………. technique.
a) recursive
b) variant
c) invariant
d) recursion
Answer:
d) recursion

Question 94.
………………. is mandatory when a function is defined after the main() function.
a) Function prototype
b) Function parameters
c) Return statement
d) None of these
Answer:
a) Function prototype

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 95.
Scope refers to the accessibility of a ……………..
a) Function
b) Class
c) Variable
d) Constant
Answer:
c) Variable

Question 96.
There are ………… types of scopes in C++.
a) five
b) two
c) three
d) four
Answer:
d) four

Question 97.
…………….. is a type of variable scope.
a) Local
b) Function / File
d) Class
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 98.
A …………… is a region or life of the variable and broadly speaking there are three places, where variables can be declared.
a) Scope
b) Access specifier
c) Location
d) None of these
Answer:
a) Scope

Question 99.
Variables inside a block are called …………… variables.
a) Local
b) Function
c) Class
d) File
Answer:
a) Local

Question 100.
Variables inside a function are called ………….. variables.
a) Local
b) Function
c) Class
d) File
Answer:
b) Function

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 101.
Variables outside of ail functions are called ………….. variables.
a) Local
b) Function
c) Class
d) Global
Answer:
d) Global

Question 102.
Variables inside a class are called ……………
a) Class variable
b) Data members
c) Member functions
d) Either A or B
Answer:
d) Either A or B

Question 103.
The scope of formal parameters is …………… scope.
a) Local
b) Function
c) Class
d) File
Answer:
b) Function

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 104.
A variable declared above all blocks and functions (including main ()) has the …………… scope.
a) Local
b) Function
c) Class
d) File
Answer:
d) File

Question 105.
The lifetime of a ………….. scope variable is the lifetime of a program.
a) Local
b) Function
c) Class
d) File
Answer:
d) File

Question 106.
The file scope variable is also called as ………….. variable.
a) Global
b) General
c) Void
d) None of these
Answer:
a) Global

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 107.
…………… provides a method for packing together data of different types.
a) Enumeration
b) Array
c) Class
d) All the above
Answer:
c) Class

Question 108.
……………… represent the features or properties of a class.
a) Member function
b) Data member
c) Global variable
d) None of these
Answer:
b) Data member

Question 109.
…………….. is a scope resolution operator.
a) ? :
b) #
c) : :
d) &&
Answer:
c) : :

Question 110.
The …………… operator reveals the hidden scope of a variable.
a) ? :
b) &&
c) : :
d) #
Answer:
c) : :

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Very Short Answers (2 Marks)

Question 1.
Write about reusability.
Answer:

  1. Few lines of code may be repeatedly used in different contexts. Duplication of the same code can be eliminated by using functions which improve the maintenance and reduce program size.
  2. Some functions can be called multiple times with different inputs.

Question 2.
Why functions are needed?
Answer:
To reduce the size and complexity of the program functions are used.

Question 3.
What are constant arguments and write their syntax?
Answer:
The constant variable can be declared using the const keyword. The const keyword makes variable, value stable. The constant variable should be initialized while declaring. The const modifier enables the assignment of an initial value to a variable that cannot be changed later inside the body of the function.
Syntax: (const )

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 4.
Write a note on the reusability of the code.
Answer:
Reusability:

  • Few lines of code may be repeatedly used in different contexts. Duplication of the same code can be eliminated by using functions which improve the maintenance and reduce program size.
  • Some functions can be called multiple times with different inputs.

Question 5.
What is function scope?
Answer:
Function Scope:

  1. The scope of variables declared within a function is extended to the function block and all sub-blocks therein.
  2. The lifetime of a function scope variable is the lifetime of the function block. The scope of.

Question 6.
What is the header file?
Answer:
C++ provides a rich collection of functions ready to be used for various tasks. The tasks to be performed by each of these are already written, debugged, and compiled, their definitions alone are grouped and stored in files called header files

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 7.
What is a built-in function?
Answer:
The ready-to-use subprograms are called pre-defined functions or built-in functions.

Question 8.
What is a user-defined function?
Answer:
C++ provides the facility to create new functions for specific tasks as per user requirements. The name of the task and data required is decided by the user and hence they are known as User-defined functions.

Question 9.
How a header file is identified?
Answer:
A header file can be identified by their file extension .h.
Example:
stdio.h

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 10.
Write note on stdio.h header file.
Answer:
This header file defines the standard I/O predefined functions getchar(), putchar(), gets(), puts() and etc.

Question 11.
What is the purpose of getchar() and putchar() functions?
Answer:
The predefined function getchar() is used to get a single character from the keyboard and putchar() function is used to display it.

Question 12.
What is the purpose of gets() and puts() functions?
Answer:
Function gets( ) reads a string including balance spaces from standard input and stores it into the string pointed by the variable. Function puts() prints the string read by gets() function in a newline.

Question 13.
Write note on isalpha( ) function.
Answer:
The isalpha( ) function is used to check whether the given character is an alphabet or not.
Syntax:
int isalpha(char c);
This function will return 1 if the given character is an alphabet, and 0 otherwise 0. The following statement assigns 0 to the variable n, since the given character is not an alphabet.
int n = isalphaC3′);
The statement is given below displays 1, since the given character is an alphabet.
cout << isalpha(‘a’); .

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 14.
Write the use of isdigit() function.
Answer:
This function is used to check whether a given character is a digit or not. This function will return 1 if the given character is a digit, and 0 otherwise.
Syntax:
int isdigit(char c);
When the following code is executed, the value of the variable n will be 1, since the given character is a digit.
char ch = ‘3’;
n = isdigit (ch);

Question 15.
How to copy a string into another string?
Answer:
The srcpy() function copies the character string pointed by the source to the memory location pointed by the target. The strcpy() function takes two arguments: target and source. The null terminating character (\0) is also copied.
Example:
char source[ ] = “Computer Science”;
char target[20]=”target”;
strcpy(target,source);

Question 16.
What is the purpose of strupr( ) and strlwr( ) functions?
Answer:

  • The strupr( ) function is used to convert the given string into Uppercase letters.
  • The strlwr( ) function is used to convert the given string into Lowercase letters.

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 17.
What is the use of return statement in a function?
Answer:
Returning from the function is done by using the return statement.
The return statement stops execution and returns to the calling function. When a return statement is executed, the function is terminated immediately at that point.

Question 18.
Write note on scope resolution operator.
Answer:
The scope operator reveals the hidden scope ‘ of a variable. The scope resolution operator (::) is used for the following purposes.

To access a Global variable when there is a Local variable with same name. An example using Scope Resolution Operator.
PROGRAM :
#include <iostream>
using namespace std;
int x=45; // Global Variable x
int main()
{
int x = 10; // Local Variable x
cout << “\nValue of global x is ” << ::x;
cout << “\nValue of local x is ” << x;
return 0;
}
Output :
Value of global x is 45
Value of local x is 10

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Short Answers (3 Marks)

Question 1.
What is divide and conquer?
Answer:
Divide and Conquer:

  1. Complicated programs can be divided into manageable sub-programs called functions.
  2. A programmer can focus on developing, debugging, and testing individual functions.
  3. Many programmers can work on different functions simultaneously.

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 2.
Write about islower( ) function.
Answer:
islower( )
This function is used to check whether a character is in lower case (small letter) or not.
This function will return a non-zero value, if the given character is a lower case alphabet, and 0 otherwise.
Syntax:
int islower(char c);

After executing the following statements, the value of the variable n will be 1 since the given character is in lower case
char ch = ‘n’;
int n = islower(ch);

The statement given below will assign 0 to the variable n, since the given character is an uppercase alphabet.
int n = islower(‘P’);

Question 3.
What is digit()? Give example.
Answer:
This function is used to check whether a given character is a digit or not. This function will return 1 if the given character is a digit, and 0 otherwise.

Example:
using namespace std;
#include
#include int main( )
{

char ch;
cout << “\n Enter a Character:”; cin >> ch;
cout << “\n The Return Value of isdigit(ch) is << isdigit(ch);

}
Output – 1
Enter a Character: 3
The Return Value of isdigit(ch) is: 1

Output – 2
Enter a Character: A
The Return Value of isdigit(ch) is: 0

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 4.
Explain the method of comparing two strings.
Answer:
strcmp( ) function compares the contents of string 1 and string2 lexicographically. The strcmp() function takes two arguments: stringl and string2.

The strcmp( ) function returns a:

  • Positive value if the first differing character in stringl is greater than the corresponding character in string2. (ASCII values are compared)
  • Negative value if the first differing character in stringl is less than the corresponding character in string2.
  • 0 if stringl and string2 are equal.

Example:
#include <string.h>
#inciude <iostream>
using namespace std;
int main()
{
char string1[ ] = “Computer”;
char string2[ ] = “Science”;
int result;
result = strcmp(string1,string2);
if(result==0)
{
cout<<“String1: “<<string1<<“and String2 : “<<string2 <<“Are Equal”;
}
else
{
cout<<“String1 :”<<string1<<” and String2 : “c<<string2<<” Are Not Equal”;
}
}
Output
String1 : Computer and String2 : Science Are Not Equal

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 5.
What is a return statement with an example?
Answer:
The return statement stops execution and returns to the calling function. When a return statement is executed, the function is terminated immediately at that point. The return statement is used to return from a function. It is categorized as a jump statement because it terminates the execution of the function and transfers the control to the called statement.

Example:
return(a + b); return(a);
return; // to terminate the function

Question 6.
Write note on sin() and cos() functions.
Answer:
cos() function
The cos() function takes a single argument in radians. The cosQ function returns the value in the range of [-1, 1], The returned value is either in double, float, or long double.
Example:
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
double x = 0.5, result;
result = cos(x);
cout << “COS(“<<x<<“)= “<<result;
}
Output
COS(0.5)= 0.877583
sin( ) function:
The sin() function takes a single argument in radians. The sin( ) function returns the value in the range of [-1, 1]. The returned value is either in double, float, or long double.

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 7.
Write about sqrt( ) and pow( ) functions.
Answer:
sqrt( ) function:
The sqrt( ) function returns the square root of the given value of the argument. The sqrt( ) function takes a single non-negative argument. If a negative value is passed as an argument to sqrt( ) function, a domain error occurs.
Example:
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
double x = 625, result;
result = sqrt(x);
cout << “sqrt(“<<x<<“) = “<<result;
return 0;
}
Output
sqrt(625) = 25
pow( ) function:
The pow( ) function returns base raised to the power of exponent. If any argument passed to pow() is long double, the return type is promoted to long double. If not, the return type is double.
The pow() function takes two arguments:
base – the base value
exponent – exponent of the base Example:
#include <iostream>
#include <math.h>
using namespace std;
int main ( )
{
double base, exponent, result;
base = 5;
exponent = 4;
result = pow(base, exponent);
cout << “pow(“< << “) = ” << result;
double x = 25;;
result = sin(x);
cout << “\nsin(“<<x<<“)= “<<result;
return 0;
}
Output
pow(5 ^ 4) = 625 sin(25)= -0.132352

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 8.
How will you generate a random numbers?
Answer:
The srand( ) function in C++ seeds the pseudo random number generator used by the rand( ) function. The seed for rand( ) function is 1 by default. It means that if no srand( ) is called before rand(), the rand() function behaves as if it was seeded with srand(1).
The srand( ) function takes an unsigned integer as its parameter which is used as seed by the rand() function. It is defined inor <stdlib,h>header file.
Example:
#include <iostream>
#include <cstdlib.h>
using namespace std;
int main()
{
int random = rand(); /* No srand() calls before rand(), so seed = 1 */
cout << “\nSeed = 1, Random number = ” << random;
srand(10);
/* Seed = 10 */
random = rand( );
cout << “\n\nSeed = 10, Random number=” << random;
return 0;
}
Output
Seed = 1, Random number = 41
Seed =10, Random number =71

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 9.
Write note on function prototype.
Answer:
Function Prototype:
C++ program can contain any number of functions. But, it must always have only one main( ) function to begin the program execution. We can write the definitions of functions in any order as we wish.

We can define the main( ) function first and all other functions after that or we can define all the needed functions prior to main( ). Like a variable declaration, a function must be declared before it is used in the program.
The declaration statement may be given outside the main( ) function.

Example:
long fact (int, double);
Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions 2

Question 10.
Explain Formal Parameters and Actual Parameters or Arguments.
Answer:
Formal Parameters and Actual Parameters or Arguments:
Arguments or parameters are the means to pass values from the calling function to the called function.

  • The variables used in the function definition as parameters are known as formal parameters.
  • The constants, variables or expressions used in the function call are known as actual parameters.

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions 3

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Explain in Detail (5 Marks)

Question 1.
Explain about generating random numbers with a suitable program.
Answer:
The srand() function in C++ seeds the pseudo-random number generator used by the rand() function. The seed for rand() function is 1 by default. It means that if no srand() is called before rand(), the rand() function behaves as if it was seeded with srand( 1). The srand() function takes an unsigned integer as its parameter which is used as seed by the rand() function. It is defined inor header file.
#include
#include using namespace std; int main()
{

int random = rand(); /* No srand() calls before rand(), so seed = 1*/
cout << “\nSeed = 1, Random number =” << random;
srand(10);
/* Seed= 10 */
random = rand();
cout << “\n\n Seed =10, Random number =” << random;
return 0;

}
Output:
Seed = 1, Random number = 41
Seed =10, Random number 71

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 2.
How will access function? Explain in detail.
Answer:
Accessing a function:
The user-defined function should be called explicitly using its name and the required arguments to be passed. The compiler refers to the function prototype to check whether the function has been called correctly.

If the argument type does not match exactly with the data type defined in the prototype, the compiler will perform type conversion, if possible. If type conversion is impossible, the compiler generates an error message.
Example :

1. display( ) calling the function without a return value and without any argument.
2. display (x, y) calling the function without a return value and with arguments.
3. x = display() calling the function with a return value and without any argument.
4. x = display (x, y) calling the function with a return value and with arguments.

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 3.
Explain constant argument in detail.
Answer:
Constant Arguments:
The constant variable can be declared using const keyword. The const keyword makes variable value stable. The constant variable should be initialized while declaring. The const modifier enables to assign an initial value to a variable that cannot be changed later inside the body of the function.
Syntax:
<returntype> <functionname> (const <datatype variable=value>)

Example:
int minimum(const int a=10);
float area(const float pi=3.14, int r=5);

PROGRAM
#include <iostream>
using namespace std; ,
double area(const double r,const double pi=3.14)
{
return(pi*r*r);
}
int main ( )
{
double rad,res;
cout<<‘AnEnter Radius :”;
cin>>rad;
res=area(rad);
cout << “\nThe Area of Circle =”<<res;
return 0;
}
OUTPUT:
Enter Radius: 5
The Area of Circle =78.5
If the variable value “r” is changed as r=25;
inside the body of the function “area” then compiler will throw an error as “assignment of
read-only parameter ‘r’ “.
double area (const double r, const double pi= 3.14)
{
r=25;
return(pi*r*r);
}

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 4.
Explain about address method.
Answer:
This method copies the address of the actual argument into the formal parameter. Since the address of the argument is passed, any change made in the formal parameter will be reflected back in the actual parameter.
#include
using namespace std;
void display(int & x) //passing address of a//
{

x = x*x;
cout << “\n\n The Value inside display function (n1 x n1) :”<< x ;

}
int main()
{
intn 1;
cout << “\n Enter the Value for N1 cin >> n1;
cout << “\n The Value of N1 is inside main function Before passing:” << n1;
display(n1);
cout << “\n The Value of N1 is inside main function After passing (n1 x n1):”<< n1; retum(O);
}

Output:
Enter the Value for N1: 45
The Value of N1 is inside the main function Before passing: 45
The Value inside display function (n1 x n1) : 2025
The Value ofNl is inside the main function After passing (n1 x n1): 2025

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 5.
Explain inline function in detial.
Answer:
Inline function:
An inline function looks like normal function in the source file but inserts the function’s code directly into the calling program. To make a function inline, one has to insert the keyword inline in the function header.

This reduces the speed of program execution. Inline functions can be used to reduce the overheads like STACKS for small function definition.
Syntax:
inline return type function name (data type parametername1,… datatype parameternameN)
Advantages of inline functions:

  • Inline functions execute faster but requires more memory space.
  • Reduce the complexity of using STACKS.

PROGRAM
#include <iostream>
using namespace std;
inline float simpleinterest (float pi, float nl, float r1)
{
float si1=(p1*n1*r1)/100;
return(si1);
}
int main ( )
{
float si,p,n,r;
cout<<“\nEnter the Principle Amount Rs. :”;
cin> >p;
cout<<“\nEnter the Number of Years:”;
cin>>n;
cout<<“\nEnter the Rate of Interest :”;
cin>>r;
si=simpleinterest(p,n,r);
cout << “\nThe Simple Interest = Rs,”<<si;
return 0;
}
Output:
Enter the Principle Amount Rs. :60000
Enter the Number of Years :10
Enter the Rate of Interest :5
The Simple Interest = Rs.30000
Though the above program is written in the normal function definition format during compilation the function code (p1*n1*r1)/100 will be directly inserted in the calling statement i.e. si=simpleinterest(p,n,r);
This makes the calling statement to change as si= (p1*n1*r1)/100;

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Hands-On Practice

Write C++ program to solve the following problems:
Question 1.
Program that reads two strings and appends the first string to the second. For example, If the first string Is entered as Tamil and the second string is Nadu, the program should print Tamilnadu. Use string library header.
Answer:
PROGRAM :
#include <string.h>
#include <iostream>
using namespace std;
int main()
{
char firststr[50],secondstr[50];
cout<<“\nEnter First String “; cin> >firststr;
cout<<“\nEnter Second String”; cin>>secondstr;
strcat(firststr,secondstr); //concatenation process
cout << ”\nConcatenated string is : ” <<firststr;
return 0;
}
Output:
Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions 4

Question 2.
Program that reads a string and converts it to uppercase. Include required header files.
Answer:
PROGRAM :
#include <string.h>
#include <iostream>
using namespace std;
int main()
{
char str[50];
cout<<“\nEnter a String
cin>>str;
cout << “\nGvien string is : “<<str; strupr(str);
cout << “\nGvien string in Uppercase is :”<<str;
return 0;
}
Output :
Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions 5

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 3.
Program that checks whether a given character is an alphabet or not. If It is an alphabet, whether It Is lowercase character or uppercase- character? Include required header files.
Answer:
PROGRAM :
#include <string.h>
#include <iostream>
using namespace std;
int main( )
{
char ch;
cout<<“\nEnter a Character”;
cin>>ch;
if(isalpha(ch))
if(islower(ch))
cout << “\nGiven Character is an Alphabet and in Lowercase”;
else
cout << “\nGiven Character is an Alphabet and in Uppercase “;
else
cout << “\nGiven Character in not an Alphabet”;
return 0;
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions 6

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 4.
Program that checks whether the given character is alphanumeric or a digit Add appropriate header file
Answer:
PROGRAM :
#include <string.h>
#include <iostream>
using namespace std;
int main()
{
char ch;
cout<<“\nEnter a Character”;
cin>>ch;
if(isalnum(ch))
if(isdigit(ch))
cout << “\nGiven Character is an Alphanumeric and digit”;
else
cout << “\nGiven Character is an Alphanumeric but not digit”;
else
cout << “\nGiven Character in not an Alphanumeric or digit”;
return 0;
}
Output:
Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions 7

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 5.
Write a function called zero_small ( ) that has two integer arguments being passed by reference and sets smaller of the two numbers to 0. Write the main program to access this function.
Answer:
PROGRAM
using namespace std;
#include <iostream>
void zero_small(int &a, int &b)
{
if (a<b)
a= 0;
else
b=0;
}
int main( )
{
int num1,num2;
cout<<“\nEnter two numbers :”; cin>>num1>>num2;
cout<<“\nNumber before set small value as 0 through function : num1=” <<num1<<” num2=”<<num2;
zero_small(num1,num2);
cout<<“\nNumber after set small value as 0 through function : num1=” <<num1<<” num2=”<<num2;
}
Output :
Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions 8
Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions 9

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 6.
Write definition for a function sumseries ( ) in C++ with two arguments/ parameters – double x and int n. The function should return a value of type double and it should perform sum of the following series:
x-x2 /3! + x3 / 5! – x4 / 7! + x5 / 9! upto n terms.
Answer:
PROGRAM :
using namespace std;
#indude
double sumseries(double x, int n)
{
double sum=0,t;
int f=1,sign=1;
t=x;
inti=1‘,j=1;
while(i<=n)
{
sum = sum + sign * t/f;
j=j + 2;
i++;
f = f*j*(j-1);
t = t * x;
sign = -sign;
}
return(sum);
}
int main()
{
int i,x,n,f=1,sign=1;
cout<<“\nEnter X value …”;
cin>>x;
cout<<“\nEnter N value …”;
cin>>n;
cout<<“\nSUM OF THE SERIES = “<<sumseries(x,n);
return 0;
}
Output :
Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions 10

Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions

Question 7.
Program that Invokes a function calc ( ) which intakes two integers and an arithmetic operator and prints the corresponding result.
Answer:
PROGRAM :
using namespace std;
#include
void calc(int numl,int num2,char op)
{
int result;
switch(op)
{
case’+’:
result = num1 + num2;
cout<<“\nAdded value “<<result;
break;
case’-‘:
result = num1 – num2;
cout<<“\nSubtracted value “<< result;
break;
case’*’:
result = num1 * num2;
cout<<“\Multiplied value”<<result;
break;
case ‘/’:
result = num1 / num2;
cout<<“\nDivided value “<<result;
break;
default:cout<<“\nPROCESS COMPLETED”;
}
}
int main()
{
float n1,n2;
char op;
cout<<“\nl. Enter two numbers”; cin>>n1>>n2;
cout<<“\nEnter an Operaotr + or – or * Or / :”; cin>>op;
calc(nl,n2,op);
}
Output :
Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions 11
Samacheer Kalvi 11th Computer Science Guide Chapter 11 Functions 12

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Tamilnadu State Board New Syllabus Samacheer Kalvi 11th Computer Science Guide Pdf Chapter 10 Flow of Control Text Book Back Questions and Answers, Notes.

Tamilnadu Samacheer Kalvi 11th Computer Science Solutions Chapter 10 Flow of Control

11th Computer Science Guide Flow of Control Text Book Questions and Answers

Book Evaluation

Part I

Choose The Correct Answer

Question 1.
What is the alternate name of null statement?
a) No statement
b) Empty statement
c) Void statement
d) Zero statement
Answer:
b) Empty statement

Question 2.
In C++, the group of statements should enclosed within:
a) { }
b) [ ]
c)()
d)<>
Answer:
a) { }

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 3.
The set of statements that are executed again and again in iteration is called as:
a) condition
b) loop
c) statement
d) body of loop
Answer:
d) body of loop

Question 4.
The multi way branching statement:
a) if
b) if… else
c) switch
d) for
Answer:
c) switch

Question 5.
How many types of iteration statements?
a) 2
b) 3
c) 4
d) 5
Answer:
b) 3

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 6.
How many times the following loop will execute?
for (int i=0; i<10; i++)
a) 0
b) 10
c) 9
d) 11
Answer:
b) 10

Question 7.
Which of the following is the exit control loop?
a) for
b) while
c) do…while
d) if…else
Answer:
c) do…while

Question 8.
Identify the odd one from the keywords of jump statements:
a) break
b) switch
c) go to
d) continue
Answer:
b) switch

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 9.
Which of the following is the exit control loop?
a) do-while
b) for
c) while
d) if-else
Answer:
a) do-while

Question 10.
A loop that contains another loop inside its body:
a) Nested loop
b) Inner loop
c) In line loop
d) Nesting of loop
Answer:
a) Nested loop

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Part – II

Short Answers

Question 1.
What is a null statement and compound statement?
Answer:
null statement; The “null or empty statement” is a statement containing only a semicolon. It takes the flowing form: ;
// it is a null statement
compound Statement:
In C++, a group of statements enclosed by pair of braces {} is called as a compound statement or a block.
The general format of compound statement is:
{
statement1;
statement2;
statement3;
}

Question 2.
What is a selection statement? Write its types?
Answer:
The selection statement means the statements are executed depends upon a condition. If a condition is true, a true block (a set of statements) is executed, otherwise, a false block is executed. This statement is also called a decision statement or selection statement because it helps in making a decision about which set of statements are to be executed.
Types:

  1. Two-way branching
  2. Multiway branching

Question 3.
Correct the following code segment:
Answer:
if (x=1)
p= 100;
else
P = 10;
Correct code: (Equal to operator is wrongly given)
if (x==1)
p= 100;
else
p = 10;

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 4.
What will be the output of the following code:
int year;
cin >> year;
if (year % 100 == 0)
if (year % 400 == 0)
cout << “Leap”;
else
cout << “Not Leap year”;

If the input is given is
(i) 2000
(ii) 2003
(iii) 2010
Answer:
i) 2000 AS INPUT
Output
Leap
ii) 2003AS INPUT
Output
Not Leap year
iii) 2010 AS INPUT
Output
Not Leap year

Question 5.
What is the output of the following code?
for (int i=2; i<=10 ; i+=2)
cout << i;
Answer:
Output
2 4 6 8 10

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 6.
Write a for loop that displays the number from 21 to 30.
Answer:
# include
using namespace std;
int main()
{
for (int = 21; i < 31; i++)
cout << “value of i:” << i << endl;
return 0;
}
Output:
Value of i: 21
Value of i: 22
Value of i: 23
Value of i: 24
Value of i: 25
Value of i: 26
Value of i: 27
Value of i: 28
Value of i: 29
Value of i: 30

Question 7.
Write a while loop that displays numbers 2,4, 6, 8…….20.
Answer:
While loop to
i = 2;
while(i<=20)
{
cout<< i <<“,”;
i = i+2;
}

Question 8.
Compare an if and a ? : operator.
Answer:
The if statement evaluates a condition, if the condition is true then a true-block is executed, otherwise false-block will be executed! Block may consists of one or more statements. The conditional operator (or Ternary operator) . is an alternative for ‘if else statement’. Here if the condition is true one statement otherwise another statement will be executed.

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Part – III

Short Answers

Question 1.
Convert the following if-else to a single conditional statement:
Answer:
if (x >= 10)
a = m + 5;
else
a = m;
a = (x >= 10)? m + 5 : m ;

Question 2.
Rewrite the following code so that it is functional:
Answer:
v = 5;
do;
{
total += v;
cout << total;
while v <=10
CORRECT CODE:
int v = 5;
do
{
total += v;
v++;
} while (v <= 10); cout << total;

Question 3.
Write a C++ program to print the multiplication table of a given number.
Answer:

# include
using namespace std;
int main ()
{

int num;
cout << “Enter Number to find its multiplication table”; cin >> num;
for (int a = 1; a < = 10; a++)
{
cout << num << “*” << a << “=” << num*a << endl;
}
return( );
}

Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 1

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 4.
Write the syntax and purpose of switch statement.
Answer:
The syntax of the switch statement is:
switch(expression)
{
case constant 1:
statement(s);
break;
case constant 2:
statement(s);
break;
.
.
.
.
default:
statement(s);
}
Purpose of switch statement:
The switch statement is a multi-way branch statement. It provides an easy way to dispatch execution to different parts of code based on the value of the expression.

Question 5.
Write a short program to print following series: a) 1 4 7 10…… 40
Answer:
PROGRAM
using namespace std;
#inciude
int main()
{
for(int i=1;i<=40;i=i+3)
cout<<i<<” “;
return 0;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 2

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Part – IV

Explain In Detail

Question 1.
Explain the control statement with a suitable example.
Answer:
Control statements are statements that alter the sequence of flow of instructions.
In a program, statements may be executed sequentially, selectively, or iteratively. Every programming language provides statements to support sequence, selection (branching), and iteration.
Selection statement:
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 3
The selection statement means the statement(s) are executed depends upon a condition. If a condition is true, a true block ¡s executed otherwise a false block is executed. This statement is also called a decision statement or selection statement because it helps in making decisions about which set of statements are to be executed.
Iteration statement:
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 4
The iteration statement is a set of the statement are repetitively executed depends upon conditions. If a condition evaluates to true, the set of statements (true block) is executed again and again. As soon as the condition becomes false, the repetition stops. This is also known as a looping statement or iteration statement.

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 2.
What entry control loop? Explain any one of the entry control loops with a suitable example.
Answer:
In an entry-controlled loop, the test- expression is evaluated before entering into a loop, while and for statements are called as entry controlled loop.
Working of while loop:
A while loop is a control flow statement that allows the loop statements to be executed as long as the condition is true. The while loop ¡s an entry-controlled loop because the test-expression is evaluated before the entering into a loop.
The while loop syntax is:
while (Test expression )
{
Body of the loop;
}
Statement-x;
In a while loop, the test expression is evaluated and if the test expression result is true, then the body of the loop is executed and again the control is transferred to the while loop. When the test expression result is false the control is transferred to statement-x.
The control flow and flow chart of the while loop is shown below.
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 5
Example:
#include <iostream>
using namespace std;
int main ()
{
int i=1,sum=0;
while(i<=10)
{
sum=sum+i;
i++;
}
cout<<“The sum of 1 to 10 is “<<sum; return 0;
}
Output
The sum of 1 to 10 is 55

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 3.
Write a program to find the LCM and GCD of two numbers.
Answer:
PROGRAM:
using namespace std;
#include <iostream>
int main()
{
int n1, n2, i, gcd;
cout<<“Enter two integers:”;
cin>>n1>>n2;
for(i=1; i <= n1 && i <= n2; ++i)
{
// Checks if i is factor of both integers
if(n1%i==0 && n2%i==0)
gcd = i;
}
int lcm = n1*n2 /gcd;
cout<<“\nG.C.M.OF”<<nl<<“and”<<n2<<”
is”<<gcd;
cout< < “\nL.C. M. OF “< < n 1 < < ” and ” < < n2< < ” is “<<lcm; return 0;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 6
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 7

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 4.
Write programs to find the sum of the following series:
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 8
Answer:
PROGRAM
using namespace std;
#include
int main()
{
int i,x,n,f=1,sign=1;
float sum=0,t;
cout<<“\nEnter N value”;
cin>>n;
cout<<“\nEnter x value …”;
cin>>x;
t=x;
for(i=1;i<=n;i++)
{
f = f * i;
sum = sum + sign * t/f;
t = t * x;
sign = -sign;
}
cout<<”SUM OF THE SERIES = “<<sum;
return O;
}
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 9
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 10
PROGRAM
using namespace std;
#include
int main()
{
int i,x,n;
float sum=0,t;
cout<<“\nEnter N value”;
cin>>n;
cout<<“\nEnter x value …”;
cin>>x;
t=x;
for(i=l;i<=n;i++)
{
sum = sum + t/i;
t = t * x;
}
cout<<“SUM OF THE SERIES = “<<sum;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 11

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 5.
Write a program to find sum of the series s=1 +x +x2 + ……..+xn
Answer:
PROGRAM
using namespace std;
#include
int main()
{
int sum=1,x,i,t,n;
cout<<“\nEnter N value”;
cin>>n;
cout<<“\nEnter x value … “;
cin>>x;
t=x;
for(i=l;i<=n;i++)
{
sum = sum + t;
t = t * x;
}
cout<<“SUM = “<<sum;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 12

11th Computer Science Guide Flow of Control Additional Questions and Answers

Choose The Correct Answer 1 Mark

Question 1.
The empty statement is otherwise called as ………………..
(a) Control statement
(b) Zero statement
(c) Null statement
(d) Block statement
Answer:
(c) Null statement

Question 2.
The basics of control structure are……………. statement.
a) Selection
b) Iteration
c) Jump
d) All the above
Answer:
d) All the above

Question 3.
Iteration statement is called as ………………..
(a) Null statement
(b) Block statement
(c) Selection statement
(d) Looping statement
Answer:
(d) Looping statement

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 4.
In a program, the action may be ……………..
a) Variable declarations
b) Expression evaluations
c) Assignment operations
d) All the above
Answer:
d) All the above

Question 5.
……………….. is a multi-path decision-making statement.
(a) if
(b) if-else
(c) else – if
(d) if-else ladder
Answer:
(d) if-else ladder

Question 6.
The ……………. is a statement containing only a semicolon.
a) Null
b) Empty statement
c) Both A and B
d) None of these
Answer:
c) Both A and B

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 7.
……………….. is more efficient than the if-else statement.
(a) Control statement
(b) Switch statement
(c) Empty statement
(d) Null statement
Answer:
(b) Switch statement

Question 8.
C++ allows a group of statements enclosed by pair of ……………..braces.
a) ()
b) { }
c) [ ]
d) < >
Answer:
b) { }

Question 9.
C++ supports types of iteration statements.
(a) 3
(b) 2
(c) 4
(d) 5
Answer:
(a) 3

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 10.
……………. statements alter the sequence of flow of instructions.
a) Control
b) Null
c) Compound
d) None of these
Answer:
a) Control

Question 11.
……………….. is used to transfer the control from one place to another place without any condition in a program.
(a) Break statement
(b) Continue statement
(c) goto statement
(d) All the above
Answer:
(c) goto statement

Question 12.
The ……………. statement are the statements, that are executed one after another only once from top to bottom.
a) Sequential
b) Selective
c) Iterative
d) None of these
Answer:
a) Sequential

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 13.
…………….. statements do not alter the flow of execution.
a) Sequential
b) Selective
c) Iterative
d) None of these
Answer:
a) Sequential

Question 14.
…………….. statements always end with a semicolon (;).
a) Sequential
b) Selective
c) Iterative
d) None of these
Answer:
a) Sequential

Question 15.
The ……………. statement means the statement (s) are executed depends upon a condition.
a) Sequential
b) Selective
c) Iterative
d) None of these
Answer:
b) Selective

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 16.
If a condition is true, a true block (a set of statements) is executed otherwise a false block is executed is called …………… statement.
a) Decision
b) Selection
c) Either A or B
d) None of these
Answer:
c) Either A or B

Question 17.
The ……………. statement is a set of the statement are repetitively executed depends upon conditions.
a) Sequential
b) Selective
c) Iterative
d) None of these
Answer:
c) Iterative

Question 18.
The condition on which the execution or exit from the loop is called ………………
a) Exit-condition
b) Test-condition
c) Either A or B
d) None of these
Answer:
c) Either A or B

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 19.
In C++, any non-zero is treated as …………… including negative numbers
a) False
b) True
c) Complement
d) None of these
Answer:
b) True

Question 20.
In C++, zero is treated as …………..
a) False
b) True
c) Complement
d) None of these
Answer:
a) False

Question 21.
Decisions in C++ are made using …………….. statement.
a) if..else
b) switch., case
c) Either A or B
d) None of these
Answer:
c) Either A or B

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 22.
……………. statement which chooses between two alternatives.
a) if..else
b) switch., case
c) Either A or B
d) None of these
Answer:
a) if..else

Question 23.
………………. creates branches for multiple alternatives sections of code, depending on the value of a single variable.
a) if..else
b) switch., case
c) Either A or B
d) None of these
Answer:
b) switch., case

Question 24.
…………. is a two-way branching statement.
a) if..else
b) switch., case
c) Either A or B
d) None of these
Answer:
a) if..else

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 25.
……………….. is a multiple branching statement.
a) if..else
b) switch., case
c) Either A or B
d) None of these
Answer:
b) switch., case

Question 26.
An if statement contains another if the statement is called …………….
a) Nested if
b) Compound if
c) Block if
d) Group if
Answer:
a) Nested if

Question 27.
The nested if can have ……………. forms.
a) four
b) two
c) three
d) five
Answer:
c) three

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 28.
……………. is nested if form.
a) If nested inside if part
b) If nested inside both if part and else part
c) If nested inside else part
d) All the above
Answer:
d) All the above

Question 29.
The ………….. is a multi-path decision-making statement.
a) if-else ladder
b) Simple if
c) if… else
d) None of these
Answer:
a) if-else ladder

Question 30.
In ……………..type of statement ‘if’ is followed by one or more else if statements and finally end with an else statement.
a) if-else ladder
b) Simple if
c) if… else
d) None of these
Answer:
a) if-else ladder

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 31.
The……………. operator is an alternative for the if-else statement.
a) Conditional
b) Ternary
c) Continue
d) Either A or B
Answer:
d) Either A or B

Question 32.
The conditional operator consists of …………….. symbols.
a) two
b) three
c) four
d) five
Answer:
a) two

Question 33.
The conditional operator takes …………….. arguments.
a) two
b) three
c) four
d) five
Answer:
b) three

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 34.
The switch statement is a …………… statement.
a) Multi-way branch
b) Two-way branch
c) Jump
d) None of these
Answer:
a) Multi-way branch

Question 35.
………….. statement provides an easy way to dispatch execution to different parts of code based on the value of the expression.
a) if..else
b) switch
c) goto
d) None of these
Answer:
b) switch

Question 36.
The ………………statement replaces multiple if-else sequences.
a) if..else
b) switch
c) go to
d) None of these
Answer:
b) switch

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 37.
The expression provided in the switch should result in a…………… value.
a) Constant
b) Variant
c) Null
d) None of these
Answer:
a) Constant

Question 38.
In switch statement …………… statement is optional.
a) default
b) break
c) Both A and B
d) None of these
Answer:
c) Both A and B

Question 39.
The …………… statement is used inside the switch to terminate a statement sequence.
a) default
b) break
c) continue
d) None of these
Answer:
b) break

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 40.
In a switch statement, when a ………….. statement is reached, the flow of control jumps to the next line following the switch statement.
a) go to
b) break
c) continue
d) None of these
Answer:
b) break

Question 41.
……………. statement checks only for equality.
a) go to
b) if,.else
c) continue
d) switch
Answer:
d) switch

Question 42.
………….. statement checks for equality as well as for logical expression.
a) go to
b) if..else
c) continue
d) switch
Answer:
b) if..else

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 43.
………….. statement uses a single expression for multiple choices.
a) go to
b) if..else
c) continue
d) switch
Answer:
d) switch

Question 44.
A(n) ………….. statement uses multiple statements for multiple choices.
a) go to
b) if..else
c) continue
d) switch
Answer:
b) if..else

Question 45.
The ……………. statement evaluates integer, character, pointer or floating-point type or Boolean type.
a) go to
b) if..else
c) continue
d) switch
Answer:
b) if..else

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 46.
……….. statement evaluates only character or an integer data type.
a) go to
b) if..else
c) continue
d) switch
Answer:
d) switch

Question 47.
If the expression inside the switch statement turns out to be false then statements are executed.
a) default
b) break
c) else block
d) None of these
Answer:
a) default

Question 48.
If the expression inside if turns out to be false, statement inside ………….. will be executed.
a) default
b) true block
c) else block
d) None of these
Answer:
c) else block

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 49.
The ………….. statement is more flexible.
a) switch
b) if
c) continue
d) None of these
Answer:
b) if

Question 50.
The …………… statement is more efficient than the if-else statement.
a) switch
b) go to
c) continue
d) None of these
Answer:
a) switch

Question 51.
Which is true related to the switch statement?
a) A switch statement can only work for the quality of comparisons.
b) No two case labels in the same switch can have identical values.
c) If character constants are used in the switch statement, they are automatically converted to their equivalent ASCII codes.
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 52.
When a switch is a part of the statement sequence of another switch, then it is called as …………….. switch statement.
a) Iterative
b) Sequential
c) Nested
d) None of these
Answer:
c) Nested

Question 53.
A(n) ………….. is a sequence of one or more statements that are repeatedly executed until a condition is satisfied.
a) Iteration
b) Looping
c) Iteration or Looping
d) None of these
Answer:
c) Iteration or Looping

Question 54.
………….. is used to reduce the length of code, to reduce time, to execute the program and takes less memory space.
a) Iteration
b) Looping
c) Iteration or Looping
d) None of these
Answer:
c) Iteration or Looping

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 55.
C++supports ………….. types of iteration statements.
a) five
b) four
c) three
d) two
Answer:
c) three

Question 56.
C++ supports ………….. type of iteration statement.
a) for
b) while
c) do..while
d) All the above
Answer:
d) All the above

Question 57.
Every loop has …………….. elements.
a) five
b) four
c) three
d) two
Answer:
b) four

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 58.
Every loop has ………….. element.
a) Initialization expression
b) Test expression / Update expression
c) The body of the loop
d) All the above
Answer:
d) All the above

Question 59.
The control variable(s) must be initialized …………. the control enters into a loop.
a) after
b) before
c) Either A or B
d) None of these
Answer:
b) before

Question 60.
Whose value decides whether the loop-body will be executed or not?
a) Test expression
b) Update expression
c) Initialization expression
d) None of these
Answer:
a) Test expression

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 61.
In an ……….. loop, the test-expression is evaluated before entering into a loop,
a) Entry-controlled
b) Exit-controlled
c) Both A and B
d) None of these
Answer:
a) Entry-controlled

Question 62.
In an ………….. loop, the test-expression is evaluated before exiting from the loop.
a) Entry-controlled
b) Exit-controlled
c) Both A and B
d) None of these
Answer:
b) Exit-controlled

Question 63.
……………. is used to change the value of the loop variable.
a) Test expression
b) Update expression
c) Initialization expression
d) None of these
Answer:
b) Update expression

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 64.
……………. statement is executed at the end of the loop after the body of the loop is executed.
a) Test expression
b) Update expression
c) Initialization expression
d) None of these
Answer:
b) Update expression

Question 65.
In an …………. loop, first, the test expression is evaluated and if it is nonzero, the body of the loop is executed otherwise the loop is terminated.
a) Entry-controlled
b) Exit-controlled
c) Both A and B
d) None of these
Answer:
a) Entry-controlled

Question 66.
In an …………. loop, the body of the loop is executed first then the test-expression is evaluated.
a) Entry-controlled
b) Exit-controlled
c) Both A and B
d) None of these
Answer:
b) Exit-controlled

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 67.
………….. loop statement contains three different statements.
a) for
b) while
c) do..while
d) All the above
Answer:
a) for

Question 68.
The for statement contains ……………. statement
a) Test expression
b) Update expression
c) Initialization expression
d) All the above
Answer:
d) All the above

Question 69.
The for statement sections are separated by ………………
a) Semicolons
b) Colon
c) Comma
d) None of these
Answer:
a) Semicolons

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 70.
The initialization part of the loop is used to initialize variables or declare a variable which is executed …………… time(s).
a) Loop repeated
b) Only one
c) two
d) None of these
Answer:
b) Only one

Question 71.
How many times the following loop will be executed?
for (i=0; i <= 10; i++);
a) 10
b) 9
c) 11
c) None of these
Answer:
c) 11

Question 72.
If the body of the loop contains a ……………. statement(s), need not use curly braces.
a) Single
b) More than one
c) Either A or B
d) None of these
Answer:
a) Single

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 73.
In for loop, multiple initializations and multiple update expressions are separated by ……………
a) Semicolons
b) Colons
c) Commas
d) None of these
Answer:
c) Commas

Question 74.
In a for loop, which expression is optional?
a) Test expression
b) Update expression
c) Initialization expression
d) All the above
Answer:
d) All the above

Question 75.
What will be formed if the following loop is executed?
for( i=0; ++i);
a) Finite loop
b) Indefinite loop
c) No iteration
d) None of these
Answer:
b) Indefinite loop

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 76.
A loop that has no statement in its body is called an ……………
a) Empty loop
b) Indefinite loop
c) Finite loop
d) None of these
Answer:
a) Empty loop

Question 77.
Identify the empty loop from the following.
a) for( i+0 ; i<=5; +=i);
b) for( i+0 ; i<=5; +=i); {cout<<“C++”;>
c) for( i+0 ; i<=5; +=i) { }
d) All the above
Answer:
d) All the above

Question 78.
A ………….. loop is useful for pausing the program for some time.
a) Time delay
b) Infinite loop
c) Finite loop
d) None of these
Answer:
a) Time delay

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 79.
……………. is a time delay loop.
a) for(i=l; i<=100; i++);
b) int i=l;
while( ++i < 10)
{
}
c) int i=l;
do
{
} while( ++i < 10);
d) All the above
Answer:
d) All the above

Question 80.
How many times the following loop will be executed?
int i=l;
while( ++i < 10)
cout<< “The value of i is “<<i;
a) 10
b) 9
c) 8
d) Infinite times
Answer:
c) 8

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 81.
How many times the following loop will be executed?
int i=l;
while( i++< 10)
cout<< “The value of i is “<<i;
a) 10
b) 9
c) 8
d) Infinite times
Answer:
b) 9

Question 82.
In ………… loop, the body of the loop will be executed atleast once.
a) while
b) do..while
c) for
d) All the above
Answer:
b) do..while

Question 83.
In ……………….. loop, the body of the loop is executed at least once, even when the condition evaluates false during the first iteration.
a) while
b) do..while
c) for
d) All the above
Answer:
b) do..while

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 84.
What will be the output of the following program?
using namespace std;
int main ()
{
int n = 10;
do
{
cout<<n<<“”; n-; }while (n>0);
}
a) 109 8 7 6 5 43 2 1
b) 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
c) 1 2 3 4 5 6 7 8 9 10
d) 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,0
Answer:
b) 10, 9, 8, 7, 6, 5, 4, 3, 2, 1

Question 85.
……………. statements are used to interrupt the normal flow of the program.
a) Jump
b) Loop
c) Decision making
d) None of these
Answer:
a) Jump

Question 86.
……………. is a jump statement.
a) go to statement
b) break statement
c) continue statement
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 87.
The ………….. statement is a control statement which is used to transfer the control from one place to another place without any condition in a program.
a) go to
b) break
c) continue
d) All the above
Answer:
a) go to

Question 88.
A …………… statement is a jump statement which terminates the execution of the loop and the control is transferred to resume normal execution after the body of the loop.
a) go to
b) break
c) continue
d) All the above
Answer:
b) break

Question 89.
…………….. statement forces the loop to continue or execute the next iteration,
a) go to
b) break
c) continue
d) All the above statement is executed in
Answer:
c) continue

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 90.
When the …………….statement is executed in the loop, the code inside the loop following the …………… statement will be skipped and the next iteration of the loop will begin.
a) go to
b) break
c) continue
d) All the above
Answer:
c) continue

Question 91.
……………. statement breaks the iteration.
a) continue
b) break
c) Both A and B
d) None of these
Answer:
b) break

Question 92.
…………… statement skips the iteration.
a) continue
b) break
c) Both A and B
d) None of these
Answer:
a) continue

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 93.
…………….. statement is used with loops as well as switch case.
a) continue
b) break
c) Both A and B
d) None of these
Answer:
b) break

Question 94.
………….. statement is only used in loops.
a) continue
b) break
c) Both A and B
d) None of these
Answer:
a) continue

Very Short Answers (2 Marks)

Question 1.
What is an if statement? Write its syntax.
Answer:
The if statement evaluates a condition, if the condition is true then a true – block (a statement or set of statements) is executed, otherwise the true – block is skipped. The general syntax of the if the statement is:
if (expression)
true – block;
statement – x;

Question 2.
What are the basic control structures?
Answer:
The basics of control structures are:

  • Selection statement
  • Iteration statement
  • Jump statement

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 3.
What is a computer program?
Answer:
A computer program is a set of statements or instructions to perform a specific task.

Question 4.
What is nested if? Mention its types.
Answer:
An if statement contains another if the statement is called nested if. The nested can have, one of the following three forms.

  1. If nested inside if part
  2. If nested inside else part
  3. If nested inside both if part and else part

Question 5.
What are control statements?
Answer:
Control statements are statements that alter the sequence of flow of instructions.
In a program, statements may be executed sequentially, selectively, or iteratively. Every programming language provides statements to support sequence, selection (branching), and iteration.

Question 6.
What is the exit condition of a loop?
Answer:
The condition on which the execution or exit from the loop is called exit-condition or test-condition.

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 7.
What is an iteration or loop?
Answer:
An iteration or loop is a sequence of one or more statements that are repeatedly executed until a condition is satisfied. These statements are also called control flow statements.

Question 8.
What are the advantages of a loop or an iteration?
Answer:
It is used to reduce the length of code, to reduce time, to execute the program, and takes less memory space

Question 9.
What are loop elements?
Answer:
Every loop has four elements that are used for different purposes. These elements are

  1. Initialization expression
  2. Test expression
  3. Update expression
  4. The body of the loop

Question 10.
What are the parts of a loop?
Answer:
Every loop has four elements that are used for different purposes. These elements are:

  • Initialization expression
  • Test expression
  • Update expression
  • The body of the loop

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 11.
Write a note on the declaration of a variable in a for a loop.
Answer:
Declaration of a variable in a for loop:
In C++, the variables can also be declared within a for loop.
For instance,
for(int i=0; i<=5; ++i)
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 13
A variable declared inside the block of main() can be accessed anywhere inside main() i.e., the scope of variable in main().

Question 12.
Write a program to display numbers from 1 to 10 except 6 using a continue statement.
Answer:
C++ program to display numbers from 1 to 10 except 6 using continue statement
#include
using namespace std;
int main()
{
if (i = 6)
continue;
else
cout << i << ” ”
}
return 0;
}
Output:
1 2 3 4 5 7 8 9 10

Question 13.
Write about the go-to statement.
Answer:
go to the statement: The go-to statement is a control statement which is used to transfer the control from one place to another place without any condition in a program.
The syntax of the go-to statement is;
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 14
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 16
In the syntax above, the label is an identifier. When go-to label; is encountered, the control of the program jumps to label: and executes the code below ¡t.

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 14.
Write a note on the break statement.
Answer:
break statement: A break statement is a jump statement which terminates the execution of the loop and the control is transferred to resume normal execution after the body of the loop. The following figure shows the working of break statement with looping statements;
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 15

Question 15.
Write a note on the continue statement.
Answer:
continue statement:
The continue statement works quite similar to the break statement. Instead of terminating the loop, the continue statement forces the loop to continue or execute the next iteration. When the continue statement is executed in the loop, the code inside the loop following the continue statement will be skipped and the next iteration of the loop will begin.
The following figure describes the working flow of the continue statement
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 17

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Short Answers 3 Marks

Question 1.
Write a note on the sequence statement.
Answer:
sequence statement:
The sequential statement is the statements, that are executed one after another only once from top to bottom. These statements do not alter the flow of execution. These statements are called sequential flow statements. They always end with a semicolon (;).
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 18

Question 2.
What is a selection statement? Mention its types.
Answer:
Selection statement: The selection statement means the statement (s) are executed depends upon a condition. If a condition is true, a true block is executed otherwise a false block is executed. This statement is also called a decision statement or selection statement because it helps in making a decision about which set of statements are to be executed.
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 19

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 3.
Explain the Iteration statement.
Answer:
Iteration statement: The iteration statement is a set of the statement are repetitively executed depends upon conditions. If a condition evaluates to true, the set of statements (true block) is executed again and again. As soon as the condition becomes false, the repetition stops. This is also known as a looping statement or iteration statement.
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 20

Question 4.
Explain if statement with syntax and an example.
Answer:
The if statement evaluates a condition, if the condition is true then a true-block is executed, otherwise, the true-block is skipped.
Syntax: if (expression) true-block; statement-x;
In the above syntax, if is a keyword that should contain expression or condition which is enclosed within parentheses. Working of if statement: If the expression is true then the true-block is executed and followed by statement-x is also executed, otherwise, the control passes to statement-x. It is implemented in the following flowchart.
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 21
Example 1:
if ( qty> 500)
dis=10;
Example 2:
if(age>=18)
cout<< “\n You are eligible for voting ….”;

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 5.
Explain if..else statement with syntax and an example.
Answer:
The syntax of the if..else statement:
if (expression)
{
True-block;
}
else
{
False-block;
}
Statement-x
Working of if..else statement:
In if..else statement, first the expression or condition is evaluated as either true or false. If the result is true, then the statements inside the true-block are executed and the false-block is skipped. If the result is false, then the statement inside the false-block is executed i.e., the true-block is skipped. It is implemented in the following flowchart.
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 22
Example:
if(num%2==0)
cout<< “\n The given number is Even”;
else
cout<< “\n The given number is Odd”;

Question 6.
What is a conditional or ternary operator? Explain.
Answer:
The conditional operator (or Ternary operator) is an alternative for the ‘if-else statement’. The conditional operator consists of two symbols (?:). It takes three arguments. The control flow of the conditional operator is shown below.
The syntax of the conditional operator is:
expression 1? expression 2: expression 3
In the above syntax, expression 1 is a condition which is evaluated, if the condition is true (Non-zero), then the control is transferred to expression 2, otherwise, the control passes to expression 3.
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 23
Example:
#include
using namespace std;
int main()
{
int a, b, largest;
cout << “\n Enter any two numbers:
cin >> a >> b;
largest = (a>b)? a : b;
cout << “\n Largest number: ” << largest;
return 0;
}
Output
Enter any two numbers: 12 98
Largest number: 98

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 7.
Explain the nested switch statement.
Answer:
Nested switch:
When a switch is a part of the statement sequence of another switch, then it is called a nested switch statement. The inner switch and the outer switch constant may or may not be the same.
The syntax of the nested switch statement is: switch (expression)
{
case constant 1:
statement(s);
break;
switch(expression)
{
case constant 1:
statement(s);
break;
case constant 2:
statement(s);
break;
.
.
.
default: statement(s);
}
case constant 2:
statement(s);
break;
.
.
.
default:
statement(s);
}
Example:
#include
using namespace std;
int main()
{
int a = 8;
cout<<“The Number is : ” < switch (a)
{
case 0 :
cout<<“The number is zero” <<endl;
break;
default:
cout<<“The number is a non-zero
integer” <<endl;
int b = a % 2;
switch (b)
{
case 0:
cout<<“The number is even” <<endl;
break;
case 1:
cout<<“The number is odd” <<endl;
break;
}
}
return 0;
}
Output
The Number is: 8
The number is a non-zero integer
The number is even

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 8.
Explain variations of for loop?
Answer:
Variations of for loop:
Variations increase the flexibility and applicability of for loop.
Multiple initializations and multiple update expressions:
Multiple statements can be used in the initialization and update expressions of for loop.
This multiple initializations and multiple update expressions are separated by commas.
For example:
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 24
Output
The value of i is 0 The value of j is 10
The value of i is 1 The value of j is 9
The value of i is 2 The value of j is 8
The value of i is 3 The value of j is 7
The value of i is 4 The value of j is 6
In the above example, the initialization part contains two variables i and j, and the update expression contains i++ and j++. These two variables are separated by commas which are executed in sequential order i.e., during initialization firstly i-0 followed by j=10. Similarly, in update expression, firstly i++ is evaluated followed by j++ is evaluated.

Question 9.
Explain for loop optional expression with suitable examples.
Answer:
Optional expressions;
The for loop contains three parts, i.e., initialization expressions, test expressions and
update expressions. These three expressions are optional in a for loop.
Case 1:
#include
using namespace std;
int main ()
{
int i, sum=0, n;
cout<<“\n Enter The value of n”;
cin>>n;
i =1;
for (; i<=10;i++)
{
sum += i;
}
cout<<“\n The sum of 1 to” <<n<<“is “<<sum;
return 0;
}
Output
Enter the value of n 5
The sum of 1 to 5 is 15
In the above example, variable i is declared and the sum is initialized at the time of variable declaration.
The variable i is assigned to 0 before the for loop but still, the semicolon is necessary before test expression.
In a for loop, if the initialization expression is absent then the control is transferred to the test expression/conditional part.
Case 2:
#include
using namespace std;
int main ()
{
int i, sum=0, n;
cout<<“\n Enter The value of n”; cin>>n;
i =1;
for (; i<=10; )
{
sum += i;
++i;
cout<<“\n The sum of 1 to” <<n<<“is “<<sum;
return 0;
}
Output
Enter the value of n 5
The sum of 1 to 5 is 15
In the above code, the update expression is hot done, but a semicolon is necessary before the update expression.
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 25
In the above code, neither the initialization nor the update expression is done in the for a loop. If both or any one of the expressions are absent then the control is transferred to the conditional part.
Case 3:
An infinite loop will be formed if a test- expression is absent in a for a loop.
For example:
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 26

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 10.
What is an empty loop? Give a suitable example.
Answer:
Empty loop:
An empty loop means a loop that has no statement in its body is called an empty loop. Following for loop is an empty loop:
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 27
In the above code, the for loop contains a null statement, it is an empty loop.
Similarly, the following for loop also forms an empty loop.
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 28
In the above code, the body of a for loop enclosed by braces is not executed at all because a semicolon is ended after the for a loop.

Question 11.
What do you mean by the nesting of loops?
Answer:
Nesting of loops:
A loop which contains another loop is called a nested loop.
The syntax is given below:
for (initialization(s); test-expression; update expression(s))
{
for (initialization(s); test-expression; update expression(s)
{
statement(s);
}
statement(s);
{
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 29
Example:
#include
using namespace std;
int main(void)
{
cout<< “A multiplication table:”
< <<endl<< “” <<endl;
for(int c = 1; c < 10; C++)
{
cout<< c << “l”;
for(int i = 1; i< 10; i++)
{
cout< }
cout<<endl;
}
return 0;
}

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 12.
What are the Differences between the Break and Continue statement?
Answer:

Break

Continue

The break is used to terminate the execution of the loop. Continue is not used to terminate the execution of the loop.
It breaks the iteration. It skips the iteration.
When this statement is executed, control will come out from the loop and executes the statement immediately after the loop. When this statement is executed, it will not come out of the loop but moves/jumps to the next iteration of the loop.
The break is used with loops as well as switch cases. Continue is only used in loops, it is not used in switch cases.

Book Evaluation

Hands-On Practice
Write a C++ program to solve the following problems:
Question 1.
Temperature – conversion program that gives the user the option of converting Fahrenheit to Celsius or Celsius to Fahrenheit and depending upon the user’s choice.
Answer:
PROGRAM :
using namespace std;
#include<iostream>
int main()
{
float f,c;
int choice;
cout<<“\nl, FahrenheiT to Celsius”;
cout<<“\n2. Celsius to FahrenheiT”;
cout<<“\n3.Exit”;
cout<<“\nENTER YOUR CHOICE “;
cin>>choice;
switch(choice)
{
case 1: cout<<“\nENTER TEMPERATURE IN FAHRENHEIT “;
cin>>f;
c=5.0/9.0 *(f-32);
cout<<“\nTEMPERATURE IN FAHRENHEIT “<<f;
cout«”\nTEMPERATURE IN CELSIUS “<<c;
break;
case 2: cout<<“\nENTER TEMPERATURE IN CELSIUS “;
cin>>c;
f = 9*c/5 + 32;
cout< <“\nTEMPERATURE IN FAHRENHEIT “<<f;
cout< < “\nTEMPERATURE IN CELSIUS “<<c;
break;
default: cout< <“\nPROCESS COMPLETED”; > .
}
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 30

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 2.
The program requires the user to enter two numbers and an operator. It then carries out the specified arithmetical operation: addition, subtraction, multiplication, or division of the two numbers. Finally, it displays the result.
using namespace std;
#include <iostream>
int main()
{
float num1,num2,result;
char op;
coutczcz”\nl. Enter two numbers”;
cin>>num1>>num2;
cout<<”\nEnter operaotr + or – or * or / : “; cin>>op;
switch(op)
{
case’+’:
result = num1 + num2;
cout<<“\nAdded value “<<result;
break;
case’-‘:
result = num1 – num2;
cout<<“\nSubtracted value “<<result;
break;
case ‘*’:
result = num1 * num2;
cout<<“\Multiplied value “<<result;
break;
case’/’:
result = num1 / num2;
cout<<“\nDivided value “<<result;
break;
default:cout<<“\nPROCESS COMPLETED”;
}
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 31
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 32

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 3.
Program to input a character and to print whether a given character is an alphabet, digit or any other character.
Answer:
PROGRAM
using namespace std;
#include <iostream>
#include
int main()
{
char ch;
cout<<“\nl. Enter a character :”; cin>>ch;
if(isdigit(ch))
cout<<“\nThe given character “<<ch<<” is a digit”;
else if(isalpha(ch))
cout<<“\nThe given character “<<ch<<” is an alphabet”;
else
cout<<“\nThe given character “<<ch<<” is other character”;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 33

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 4.
Program to. print whether a given character Is an uppercase or a lowercase character or a digit or any other character. Use ASCII codes for it. The ASCII codes are as given below:
Answer:
Characters -ASCII Range
‘0’ – ‘9’ – 48 – 57
‘A’ – ‘Z’ – 65 – 90
‘a’ – ‘z’ – 97 – 122
other characters 0 – 255 excluding the above-mentioned codes.
PROGRAM
using namespace std;
#include
int main()
{
char ch;
cout<<“\nl. Enter a character: cin>>ch;
int av = ch;
if(av>47 m av<58)
cout<<“\nThe given character “<<ch<<” is a digit”; else if(av>64 && av<91)
cout<<“\nThe given character “<<ch<<” is an Uppercase character”; else if(av>96 && av < 123)
cout<<“\nThe given character “<<ch<<” is n Lowercase character”;
else
cout<<“\nThe given character “<<ch<<” is an Other character”;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 34
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 35

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 5.
Program to calculate the factorial of an integer.
Answer:
PROGRAM
using namespace std;
#include
int main()
{
int i,n;
long int fact=l;
cout<<“\nEnter a number… cin>>n; ‘
for(i=l; i<=n; i++)
fact = fact * i;
cout<<“\nFactorial of “<<n<<” is “<<fact;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 36

Question 6.
Program that print 1 2 4 8 16 32 64 128.
Answer:
PROGRAM
using namespace std;
#include
int main()
{
int i;
for(i=l; i< =128; i=i*2)
cout<<i<<“\t”;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 37

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 7.
Program to generate divisors of an integer.
Answer:
PROGRAM
using namespace std;
#include
int main() {
int n,d;
cout<<“\n Enter a number…”; cin>>n;
cout<<“\nThe divisors for “< for(d=l; d<=n/2;d++)
if(n%d==0)
cout<<d<<“\t”;
cout<<n;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 38

Question 8.
Program to print fibonacci series i.e., 0112 3 5 8
Answer:
PROGRAM
using namespace std;
#include
int main()
{
int n,fl,f2,f3;
fl=-l; ,
f2=l;
cout«”\nHOW MANY TERMS … “; .
cin>>n;
cout<<,r\nThe FIBONACCI TERMS ARE \n”; for(int i=l; i<=h;i++)
{
f3=fl+f2;
cout<<f3<<“\n”;
fl-f2;
f2=f3;
}
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 39

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 9.
Programs to produces the following design using nested loops.
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 41
Answer:
9. A)
PROGRAM
using namespace std;
#include
int main()
{
int i,j;
for(i=l; i<=6; i++)
{
char c = ‘A’; for(j=l;j<=i;j++)
{
cout<<c<<“\t”;
C++;
}
cout<<“\n\n”;
}
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 42
9. B)
PROGRAM
using namespace std;
#include
int main()
{
int i,j;
for(i=l; i<=5; i++) { for(j=5;j>=i;j–)
cout<<j<<“\t”;
cout<<“\n\n”;
}
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 43
9.c)
PROGRAM
using namespace std;
#include
int main()
{
int i,j,k=0,m;
for(i=7; i> = l; i=i-2)
{
for(j=l;j<=i;j++)
cout<<“#\t”;
cout<<“\n\n”;
k++;
for(m=l;m<=k;m++)
cout<<“\t”;
}
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 44

Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control

Question 10.
Program to check whether the square root of a number is a prime or not.
Answer:
PROGRAM
using namespace std;
#include
#include int main()
{
int n,srn,d,p=0;
cout<<“\nENTER A NUMBER … cin>>n;
srn=sqrt(n);
cout<<“\nTHE GIVEN NUMBER IS “<<n;
cout<<“\nTHE SQUARE ROOT OF”<<n<<” IS”<<srn;
for(d=2; d<=srn/2;d++)
{
if(srn%d==0)
{
p=1;
break;
}
}
if(p==0)
cout <<“\nTHE SQUARE ROOT OF THE GIVEN NUMBER “<<n<<” IS A PRIME”; else
cout <<“\nTHE SQUARE ROOT OF THE GIVEN NUMBER “<<n<<” IS NOT A PRIME”;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 10 Flow of Control 45

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Tamilnadu State Board New Syllabus Samacheer Kalvi 11th Computer Science Guide Pdf Chapter 9 Introduction to C++ Text Book Back Questions and Answers, Notes.

Tamilnadu Samacheer Kalvi 11th Computer Science Solutions Chapter 9 Introduction to C++

11th Computer Science Guide Introduction to C++ Text Book Questions and Answers

Book Evaluation
Part I

Choose The Correct Answer

Question 1.
Who developed C++?
a) Charles Babbage
b) Bjarne Stroustrup
c) Bill Gates
d) Sundar Pichai
Answer:
b) Bjarne Stroustrup

Question 2.
What was the original name given to C++?
a) CPP
b) Advanced C
c) C with Classes
d) Class with C
Answer:
c) C with Classes

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 3.
Who coined C++?
a) Rick Mascitti
b) Rick Bjarne
c) Bill Gates
d) Dennis Ritchie
Answer:
a) Rick Mascitti

Question 4.
The smallest individual unit in a program is:
a) Program
b) Algorithm
c) Flowchart
d) Tokens
Answer:
d) Tokens

Question 5.
Which of the following operator is extraction operator of C++?
a) >>
b) <<
c) <>
d) AA
Answer:
a) >>

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 6.
Which of the following statements is not true?
a) Keywords are the reserved words convey specific meaning to the C++ compiler.
b) Reserved words or keywords can be used as an identifier name.
c) An integer constant must have at least one digit without a decimal point.
d) Exponent form of real constants consists of two parts
Answer:
b) Reserved words or keywords can be used as an identifier name.

Question 7.
Which of the following is a valid string literal?
a) ‘A’
b) ‘Welcome’
c) 1232
d) “1232”
Answer:
d) “1232”

Question 8.
A program written in high level language is called as ………………………
a) Object code
b) Source code
e) Executable code
d) All the above
e) Executable code
Answer:
b) Source code

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 9.
Assume a=5, b=6; what will be result of a & b?
a) 4
b) 5
c) 1
d) 0
Answer:
a) 4

Question 10.
Which of the following is called as compile time operators?
a) size of
b) pointer
c) virtual
d) this
Answer:
a) sizeof

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Part – II

Very Short Answers

Question 1.
What is meant by a token? Name the token available in C++.
Answer:
C++ program statements are constructed by many different small elements such as commands, variables, constants, and many more symbols called operators and punctuators. Individual elements are collectively called Lexical units or Lexical elements or Tokens.
C++ has the following tokens:

  1. Keywords
  2. Identifiers
  3. Literals
  4. Operators
  5. Punctuators

Question 2.
What are keywords? Can keywords be used as identifiers?
Answer:
Keywords:
Keywords are the reserved words which convey specific meaning to the C++ compiler.
They are the essential elements to construct C++ programs.
Example:
int / float / auto / register Reserved words or keywords cannot be used as an identifier name.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 3.
The following constants are of which type?

  1. 39
  2. 032
  3. OXCAFE
  4. 04.14

Answer:

  1. 39 – Decimal
  2. 032 – Octal
  3. OXCAFE – Hexadecimal
  4. 04.14 – Decimal

Question 4.
Write the following real constants into the exponent form:
i) 23.197
ii) 7.214
iii) 0.00005
iv) 0.319
Answer:
i) 23.197 : 0.23197 E2 (OR) 2.3197 E1 (OR) 23197E-3
ii) 7.214 : 0.7214 E1 (OR) 72.14 E-1 (OR) 721.4 E-2 (OR) 7214E-3
iii) 0.00005 : 5E-5
iv) 0.319 : 3.19 E-l (OR) 31.9 E-2 (OR) 319 E-3

Question 5.
Assume n=10; what will be result of n>>2;?
Answer:
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 1

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 6.
Match the following:

A

B

(a) Modulus (1) Tokens
(b) Separators (2) Remainder of a division
(c) Stream extraction (3) Punctuators
(d) Lexical Units (4) get from

Answer:
a) 2
b) 3
c) 4
d) 1

Part – III

Short Answers

Question 1.
Describe the differences between keywords and identifiers.
Answer:
Keywords:

  • Keywords are the reserved words which convey specific meaning to the C++ compiler.
  • They are essential elements to construct C++ programs.
  • Most of the keywords are common to C, C++, and Java.

Identifiers:

  • Identifiers are the user-defined names given to different parts of the C++ program.
  • They are the fundamental building blocks of a program.
  • Every language has specific rules for naming the identifiers.

Question 2.
Is C++ case sensitive? What is meant by the term “case sensitive”?
Answer:
Yes. C++ is case sensitive as it treats upper and lower-case characters differently.
Example: NUM, Num, num are different in C++.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 3.
Differentiate “=” and “==”.
Answer:

  • ‘=’ is an assignment operator which is used to assign a value to a variable which is on the left hand side of an assignment statement.
  • ‘=’operator copies the value at the right side
    of the operator to the left side variable. Ex. num = 10; means 10 assign to the variable num.
  • ‘= =’ is a relational operator. It is used to compare both operands are same or not.
  • Ex. num = = 10 means it compare num value with 10 and returns true(l) if both are same or returns false(0)

Question 4.
Assume a=10, b=15; What will be the value of a∧b?
Answer:
Bitwise XOR (∧) will return 1 (True) if only one of the operand is having a value 1 (True). If both are True or both are False, it will return 0 (False).
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 2

Question 5.
What is the difference between “Run time error” and “Syntax error”?
Answer:
Run time Error:

  • A run time error occurs during the execution of a program. It occurs because of some illegal operation that takes place.
  • For example, if a program tries to open a file which does not exist, it results in a run-time error.

Syntax Error:

  • Syntax errors occur when grammatical rules of C++ are violated.
  • For example: if you type as follows, C++ will throw an error.
    cout << “Welcome to Programming in C++”

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 6.
What are the differences between “Logical error” and “Syntax error”?
Answer:

  • A Program has not produced the expected result even though the program is grammatically correct. It may be happened by the wrong use of variable/operator/order of execution etc. This means, the program is grammatically correct, but it contains some logical error. So, a Semantic error is also called a “Logic Error”.
  • Syntax errors occur when grammatical rules of C++ are violated.

Question 7.
What is the use of a header file?
Answer:
Header files contain definitions of Functions and Variables, which are imported or used into any C++ program by using the preprocessor #include statement. Header files have an extension “.h” which contains C++ function declaration and macro definition.
Example: #include

Question 8.
Why is main function special?
Answer:
Every C++ program must have a main function. The main() function is the starting point where all C++ programs begin their execution. Therefore, the executable statements should be inside the main() function.

Question 9.
Write two advantages of using include compiler directive.
Answer:

  1. The program is broken down into modules, thus making it more simplified.
  2. More library functions can be used, at the same time size of the program is retained.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 10.
Write the following in real constants.

  1. 15.223
  2. 211.05
  3. 0.00025

Answer:

  1. 15.223 → 1.5223E1 → 0.15223E2 → 15223E-3
  2. 211.05 → 2.1105E2 → 21105 E-2
  3. 0.00025 → 2.5E-4

Part – IV

Explain In Detail

Question 1.
Write about Binary operators used in C++.
Answer:
Binary Operators require two operands:
Arithmetic operators that perform simple arithmetic operations like addition, subtraction, multiplication, division (+, -, *, %, /), etc. are binary operators which require a minimum of two operands.

Relational operators are used to determining the relationship between its operands. The relational operators (<, >, >=, <=, ==, !=) are applied on two operands, hence they are binary operators. AND, OR (logical operator) both are binary operators. The assignment operator is also a binary operator (+=, – =, *=, /=, %=).

Question 2.
What are the types of Errors?
Answer:
COMMON TYPES OF ERRORS

Type of Error

Description

Syntax Error Syntax is a set of grammatical rules to construct a program. Every programming language has unique rules for constructing the sourcecode.
Syntax errors occur when grammatical rules of C++ are violated.
Example: if we type as follows, C++ will throw an error.
cout << “Welcome to C++”
As per grammatical rules of C++, every executable statement should terminate with a semicolon. But, this statement does not end with a semicolon.
Semantic error’ A Program has not produced expected result even though the program is grammatically correct. It may be happened by the wrong use of variable/operator/order of execution etc. This means, the program is grammatically correct, but it contains some logical error. So, Semantic error is also called a “Logic Error”.
Run­ time error  A run time error occurs during the execution of a program. It occurs because of some illegal operation that takes place.
For example, if a program tries to open a file which does not exist, it results in a run-time error.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 3.
Assume a=15, b=20; What will be the result of the following operations?
a) a&b
b) a|b
c) aAb
d)a>>3
e) (~b)
Answer:
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 3

11th Computer Science Guide Introduction to C++ Additional Questions and Answers

Choose The Correct Answer

Question 1.
The latest standard version published in December 2017 as ISO/IEC …………….. which is informally known as C++ 17.
(a) 14882 : 1998
(b) 14883 : 2017
(c) 14882 : 2017
(d) 14882 : 2000
Answer:
(c) 14882 : 2017

Question 2.
C++ language was developed at ……………….
a) Microsoft
b) Borland International
c) AT & T Bell Lab
d) Apple Corporation
Answer:
c) AT & T Bell Lab

Question 3.
An integer constant is also called……………..
(a) fixed point constant
(b) floating-point constant
(c) real constants
(d) Boolean literals
Answer:
(a) fixed point constant

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 4.
C++supports ………… programming paradigms.
a) Procedural
b) Object-Oriented
c) Both A and B
d) None of these
Answer:
c) Both A and B

Question 5.
…………….. relational operators are binary operators.
(a) 7
(b) 8
(c) 6
(d) 2
Answer:
(c) 6

Question 6.
C++ is a superset (extension) of …………….. language.
a) Ada
b) BCPL
c) Simula
d) C
Answer:
d) C

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 7
…………….. used to label a statement.
(a) colon
(b) comma
(c) semicolon
(d) parenthesis
Answer:
(a) colon

Question 8.
The name C++ was coined by …………….
a) Lady Ada Lovelace
b) Rick Mascitti
c) Dennis Ritchie
d) Bill Gates
Answer:
b) Rick Mascitti

Question 9.
IDE stands for ……………..
(a) Integrated Development Environment
(b) International Development Environment
(c) Integrated Digital Environment
(d) None of the above
Answer:
(a) Integrated Development Environment

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 10.
Till 1983, C++ was referred to as …………………
a) New C
b) C with Classes
c) Both A and B
d) None of these
Answer:
c) Both A and B

Question 11.
…………….. data type signed more precision fractional value.
(a) char
(b) short
(c) long double
(d) signed doubles
Answer:
(c) long double

Question 12.
C# (C-Sharp), D, Java, and newer versions of C languages have been influenced by ………………. language.
a) Ada
b) BCPL
c) Simula
d) C++
Answer:
d) C++

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 13.
…………….. manipulator is the member of iomanip header file.
(a) setw
(b) setfill
(c) setf
(d) all the above
Answer:
(d) all the above

Question 14.
C++is ……………… language.
a) Structural
b) Procedural
c) Object-oriented
d) None of these
Answer:
c) Object-oriented

Question 15.
C++ includes ………………..
a) Classes and Inheritance
b) Polymorphism
c) Data abstraction and Encapsulation
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 16.
C language does not allow ………………
a) Exception handling
b) Inheritance
c) Function overloading
d) All the above
Answer:
d) All the above

Question 17.
……………. is a set of characters which are allowed to write a C++ program.
a) Character set
b) Tokens
c) Punctuators
d) None of these
Answer:
a) Character set

Question 18.
A character represents any …………………..
a) Alphabet
b) Number
c) Any other symbol (special characters)
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 19.
Most of the Character set, Tokens, and expressions are very common to C based programming languages like ………………..
a) C++
b) Java
c) PHP
d) All the above
Answer:
d) All the above

Question 20.
…………… is a white space.
a) Horizontal tab
b) Carriage return
c) Form feed
d) All the above
Answer:
d) All the above

Question 21.
C++ program statements are constructed by many different small elements called……………….
a) Lexical units
b) Lexical elements
c) Tokens
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 22.
…………… is a C++token.
a) Keywords
b) Identifiers and Literals
c) Punctuators and Operators
d) All the above
Answer:
d) All the above

Question 23.
The smallest individual unit in a program is known as a ……………
a) Token
b) Lexical unit
c) Token or a Lexical unit
d) None of these
Answer:
c) Token or a Lexical unit

Question 24.
………………… are the reserved words which convey specific meaning to the C++ compiler.
a) Keywords
b) Identifiers and Literals
c) Punctuators and Operators
d) All the above
Answer:
a) Keywords

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 25.
………………. are the essential elements to construct C++ programs.
a) Keywords
b) Identifiers and Literals
c) Punctuators and Operators
d)All the above
Answer:
a) Keywords

Question 26.
Most of the keywords are common to …………… languages.
a) C, and C++
b) C++ and Java
c) C, C++ and Java
d) None of these
Answer:
c) C, C++ and Java

Question 27.
……………. is a case sensitive programming language.
a) C, and C++
b) C++ and Java
c) C, C++ and Java
d) None of these
Answer:
c) C, C++ and Java

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 28.
In ……………. language, all the keywords must be in lowercase.
a) C, and C++
b) C++ and Java
c) C, C++ and Java
d) None of these
Answer:
c) C, C++ and Java

Question 29.
……………… is a new keyword in C++.
a) using
b) namespace
c) std
d) All the above
Answer:
d) All the above

Question 30.
…………….. is a new keyword in C++.
a) bal
b) static_cast
c) dynamic_cast
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 31.
………….. is a new keyword in C++.
a) true
b) false
c) Both A and B
c) None of these
Answer:
c) None of these

Question 32.
Identifiers are the user-defined names given to …………..
a) Variables and functions
b)Arrays
c) Classes
d) All the above
Answer:
d) All the above

Question 33.
Identifiers containing a …………. should be avoided by users.
a) Double underscore
b) Underscore
c) number
d) None of these
Answer:
a) Double underscore

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 34.
The first character of an identifier must be an ………….
a) Alphabet
b) Underscore (_)
c) Alphabet or Underscore (_)
c) None of these
Answer:
c) Alphabet or Underscore (_)

Question 35.
Only …………… is permitted for the variable name.
a) Alphabets
b) Digits
c) Underscore
d) All the above
Answer:
d) All the above

Question 36.
Identify the correct statement from the following.
a) C++ is case sensitive as it treats upper and lower-case characters differently.
b) Reserved words or keywords cannot be used as an identifier name.
c) As per ANSI standards, C++ places no limit on its length.
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 37.
ANSI stands for …………..
a) All National Standards Institute
b) Advanced National Standards Institute
c) American National Standards Institute
d) None of these
Answer:
c) American National Standards Institute

Question 38.
Identify the invalid variable name from the following.
a) num-add
b) this
c) 2myfile
d) All the above
Answer:
d) All the above

Question 39.
Identify the odd one from the following.
a) Int
b) _add
c) int
d) tail marks
Answer:
c) int

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 40.
……………… are data items whose values do not change during the execution of a program.
a) Literals
b) Constants
c) Identifiers
d) Both A and B
Answer:
d) Both A and B

Question 41.
…………. is a type constant in C++.
a) Boolean constant
b) Character constant
c) String constant
d) All the above
Answer:
d) All the above

Question 42.
…………… is a type of numeric constant.
a) Fixed point constant
b) Floating-point constant
c) Both A and B
d) None of these
Answer:
c) Both A and B

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 43.
……………. are whole numbers without any fractions.
a) Integers
b) Real constant
c) Floating-point constant
d) None of these
Answer:
a) Integers

Question 44.
In C++, there are …………….. types of integer constants.
a) Two
b) Three
c) Four
d) Six
Answer:
b) Three

Question 45.
In C++, ……………… is a type of integer constant.
a) Decimal
b) Octal
c) Hexadecimal
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 46.
Any sequence of one or more digits (0 …. 9) is called ……………… integer constant.
a) Decimal
b) Octal
c) Hexadecimal
d) All the above
Answer:
a) Decimal

Question 47.
Any sequence of one or more octal values (0 …. 7) that begins with 0 is considered as a(n) …………… constant.
a) Decimal
b) Octal
c) Hexadecimal
d) All the above
Answer:
b) Octal

Question 48.
When you use a fractional number that begins with 0, C++ has consider the number as ………………..
a) An integer not an Octal
b) A floating-point not an Octal
c) An integer not a Hexadecimal
d) None of these
Answer:
a) An integer not an Octal

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 49.
Any sequence of one or more Hexadecimal values (0 …. 9, A …. F) that starts with Ox or OX is considered as a(n) ………….. constant.
a) Decimal
b) Octal
c) Hexadecimal
d) All the above
Answer:
c) Hexadecimal

Question 50.
Identify the invalid octal constant,
a) 05,600
b) 04.56
c) 0158
d) All the above
Answer:
d) All the above

Question 51.
Identify the valid hexa decimal constant
a) 0X1,A5
b) 0X.14E
c) CAFE
d) CPP
Answer:
c) CAFE

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 52.
The suffix ………….. added with any constant forces that to be represented as a long constant.
a) L or I
b) U or u
c) LO
d) Lg
Answer:
a) L or I

Question 53.
The suffix …………… added with any constant forces that to be represented as an unsigned constant.
a) L or I
b) U or u
c) US
d) us
Answer:
b) U or u

Question 54.
A _______ constant is a numeric constant having a fractional component.
a) Real
b) Floating point
c) Real or Floating point
d) None of these
Answer:
c) Real or Floating point

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 55.
……………. constants may be written in fractional form or in exponent form.
a) Real
b) String
c) Character
d) Integer constant
Answer:
a) Real

Question 56.
Exponent form of real constants consists of ………….. parts.
a) three
b) two
c) four
d) five
Answer:
b) two

Question 57.
Exponent form of real constants consists of ……………. part.
a) Mantissa
b) Exponent
c) Both A and B
d) None of these
Answer:
c) Both A and B

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 58.
The mantissa must be a(n) …………. constant.
a) Integer
b) Real
c) Either A or B
d) None of these
Answer:
c) Either A or B

Question 59.
58.64 can be written as …………….
a) 5.864E1
b) 0.5864E2
c) 5864E-2
d) All the above
Answer:
d) All the above

Question 60.
Internally boolean true has value ……………
a) 0
b) 1
c) -1
d) None of these
Answer:
b) 1

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 61.
Internally boolean false has value …………….
a) 0
b) 1
c) -1
d) None of these
Answer:
a) 0

Question 62.
A character constant is any valid single character enclosed within ………….. quotes.
a) Double
b) Single
c) No
d) None of these
Answer:
b) Single

Question 63.
Identify the odd one from the following,
a) ‘A’
b) ‘2’
c) ‘$’
d) “A”
Answer:
d) “A”

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 64.
The value of a single character constant has an equivalent ………….. value.
a) BCD
b) ASCII
c) Nibble
d) None of these
Answer:
b) ASCII

Question 65.
The ASCII value of ‘A’ is …………..
a) 65
b) 97
c) 42
d) 75
Answer:
a) 65

Question 66.
The ASCII value of ‘a’ is ……………
a) 65
b) 97
c) 42
d) 75
Answer:
b) 97

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 67.
C++ allows certain non-printable characters represented as ……………. constants.
a) Integer
b) Real
c) Character
d) String
Answer:
c) Character

Question 68.
The non-printable characters can be represented by using …………………………
a) Escape sequences
b) String
c) Boolean
d) None of these
Answer:
a) Escape sequences

Question 69.
An escape sequence is represented by a backslash followed by …………. character(s).
a) One
b) Two
c) One or Two
d) None of these
Answer:
c) One or Two

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 70.
______ is escape sequence for audible or alert bell.
a) \a
b)\b
c) \n
d)\f
Answer:
a) \a

Question 71
_______ is escape sequence for backspace.
a)\a
b)\b
c) \n
d) \f
Answer:
b)\b

Question 72.
______ is escape sequence for form feed.
a)\a
b)\b .
c) \n
d) \f
Answer:
d) \f

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 73.
______ is escape sequence for new line or line feed.
a) a
b)\b
c)\n
d)\f
Answer:
c)\n

Question 74.
……………. is escape sequence for carriage return.
a)\r
b)\c
c)\n
d)\cr
Answer:
a)\r

Question 75.
______ is escape sequence for horizontal tab.’
a)\a ‘
b)\b
c)\t
d)\f
Answer:
c)\t

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 76.
_______ is escape sequence for vertical tab.
a)\v
b)\b
c) \t
d) \f
Answer:
a)\v

Question 77.
………………. is escape sequence for octal number.
a) \On
b) \xHn
c)\O
d)O
Answer:
a) \On

Question 78.
______ is escape sequence for hexadecimal number.
a) \On
b) \xHn
c)\O
d)\O
Answer:
b) \xHn

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 79
______ ¡s escape sequence for Null character.
a) \On
b) \xHn
c)\O
d)\n
Answer:
c)\O

Question 80.
______ ¡s escape sequence for Inserting?
a) \?
b) \\
c)\’
d)\”
Answer:
a) \?

Question 81.
______ is an escape sequence for inserting a single quote.
a)\?
b)\\
c) \‘
d) \“
Answer:
c) \‘

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 82.
______ is escape sequence for inserting double quote.
a)\?
b)\\
c) \‘
d) \“
Answer:
d) \“

Question 83.
______ is escape sequence for inserting
a)\?’
b)\\
c) \‘
d) \“
Answer:
b)\\

Question 84.
ASCII was first developed and published in 1963 by the …………. Committee, a part of the American Standards Association (ASA).
a) X3
b) A3
c) ASA
d) None of these
Answer:
a) X3

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 85.
Sequence of characters enclosed within ………. quotes are called as String literals,
a) Single
b) Double
c) No
d) None of these
Answer:
b) Double

Question 86.
By default, string literals are automatically added with a special character………..at the end.
a) ‘\0’ (Null)
b) ‘\S’
c) V
d) None of these
Answer:
a) ‘\0’ (Null)

Question 87.
Identify the valid string constant from the following.
a) “A”
b) “Welcome”
c) “1234”
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 88.
The symbols which are used, to do some mathematical or logical operations are called as ………………
b) Operands
d) None of these
a) Operators
c) Expressions
Answer:
a) Operators

Question 89.
The data items or values that the operators act upon are called as ……………
a) Operators
b) Operands
c) Expressions
d) None of these
Answer:
b) Operands

Question 90.
In C++, the operators are classified as ………… types on the basis of the number of operands,
a) two
b) three
c) four ,
d) five
Answer:
b) three

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 91.
………….. operators require only one operand.
a) Unary
b) Binary
c) Ternary
d) None of these
Answer:
a) Unary

Question 92.
…………… operators require two operands.
a) Unary
b) Binary
c) Ternary
d) None of these
Answer:
b) Binary

Question 93.
………… operators require three operands.
a) Unary
b) Binary
c) Ternary
d) None of these
Answer:
c) Ternary

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 94.
C++ operators are classified as …………… types
a) 7
b) 3
c) 10
d) 4
Answer:
a) 7

Question 95.
…………… operators perform simple operations like addition, subtraction, multiplication, division etc.
a) Logical
b) Relational
c) Arithmetic
d) Bitwise
Answer:
c) Arithmetic

Question 96.
…………… operator is used to find the remainder of a division.
a) /
b) %
c) *
d) **
Answer:
b) %

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 97.
…………….. operator is called as Modulus operator.
a) /
b)%
c) *
d) **
Answer:
b)%

Question 98.
An increment or decrement operator acts upon a …………….. operand and returns a new value,
a) Single
b) Two
c) Three
d) None of these
Answer:
a) Single

Question 99.
………….. is a unary operator.
a) ++
b) —
c) Both ++ and —
d) None of these
Answer:
c) Both ++ and —

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 100.
The increment operator adds …………….. to its operand.
a) 1
b) 0\
c) -1
d) None of these
Answer:
a) 1

Question 101.
The decrement operator subtracts …………… from its operand.
a) 1
b) 0\
c) -1
d) None of these
Answer:
a) 1

Question 102.
The …………….. operators can be placed either as prefix (before) or as postfix (after) to a variable.
a) ++
b) –
c) ++or–
d) None of these
Answer:
c) ++or–

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 103.
With the prefix version, C++ performs the increment/decrement………….. using the operand.
a) Before
b) After
c) When required
d) None of these
Answer:
a) Before

Question 104.
With the postfix version, C++ performs the increment/decrement…………….. using the operand.
a) Before
b) After
c) When required
d) None of these
Answer:
b) After

Question 105.
With the postfix version, C++ uses the value of the operand in evaluating the expression …………… incrementing /decrementing its present value.
a) Before
b) After
c) When required
d) None of these
Answer:
a) Before

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 106.
……………… operators are used to determining the relationship between its operands.
a) Logical
b) Relational
c) Arithmetic
d) Bitwise
Answer:
b) Relational

Question 107.
When the relational operators are applied on two operands, the result will be a …………… value.
a) Boolean
b) Numeric
c) Character
d) String
Answer:
a) Boolean

Question 108.
C++ provides …………. relational operators.
a) Seven
b) six
c) Eight
d) Five
Answer:
b) six

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 109.
All six relational operators are ……………
a) Unary
b) Binary
c) Ternary
d) None of these
Answer:
b) Binary

Question 110.
A logical operator is used to evaluate …………… expressions.
a) Logical and Relational
b) Logical
c) Relational
d) None of these
Answer:
a) Logical and Relational

Question 111.
Which logical operator returns 1 (True), if both expressions are true, otherwise it returns 0 (false)?
a) AND
b) OR
c) NOT
d) All the above
Answer:
a) AND

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 112.
Which logical operator returns 1 (True) if either one of the expressions is true. It returns 0 (false) if both the expressions are false?
a) AND
b) OR
c) NOT
d) All the above
Answer:
b) OR

Question 113.
Which logical operator simply negates or inverts the true value?
a) AND
b) OR
c) NOT
d) All the above
Answer:
c) NOT

Question 114.
AND, OR both are ……………. operators.
a) Unary
b) Binary
c) Ternary
d) None of these
Answer:
b) Binary

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 115.
NOT is a(n) …………… operator.
a) Unary
b) Binary
c) Ternary
d) None of these
Answer:
a) Unary

Question 116.
Identify the correct statement from the following.
a) The logical operators act upon the operands that are themselves called logical expressions.
b) Bitwise operators work on each bit of data and perform the bit-by-bit operations.
c) There are two bitwise shift operators in C++, Shift left (<<) & Shift right (>>).
d) All the above
Answer:
d) All the above

Question 117.
In C++, there are …………… kinds of bitwise operator.
a) Three
b) Four
c) Two
d) Five
Answer:
a) Three

Question 118.
…………. is a type of bitwise operator.
a) Logical bitwise operators
b) Bitwise shift operators
c) One’s compliment operators
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 119.
______ will return 1 (True) if both the operands are having the value 1 (True); Otherwise, it will return 0 (False).
a) Bitwise AND (&) .
b) Bitwise OR (|)
c) Bitwise Exclusive OR(A)
d) None of these
Answer:
a) Bitwise AND (&)

Question 120.
………… will return 1 (True) if any one of the operands is having a value 1 (True); It returns 0 (False) if both the operands are having the value 0 (False)
a) Bitwise AND (&)
b) Bitwise OR (|)
c) Bitwise Exclusive OR(A)
d) None of these
Answer:
b) Bitwise OR (|)

Question 121.
…………. will return 1 (True) if only one of the operand is having a value 1 (True).If both are True or both are False, it will return 0 (False).
a) Bitwise AND (&)
b) Bitwise OR (|)
c) Bitwise Exclusive OR(A)
d) None of these
Answer:
c) Bitwise Exclusive OR(A)

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 122.
There are …………… bitwise shift operators in C++.
a) Three
b) Two
c) Four
d) Five
Answer:
b) Two

Question 123.
……………. is a type of * .wise shift operator in
C++.
a) Shift left
b) Shift right
c) Both A and B
d) None of these
Answer:
c) Both A and B

Question 124.
……………. is a type of bitwise shift left operator in C++.
a) <<
b) >>
c) &&
d) ||
Answer:
a) <<

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 125.
…………. is a type of bitwise shift right operator in C++.
a) <<
b) >>
c) &&
d) ||
Answer:
b) >>

Question 126.
The value of the left operand is moved to the left by the number of bits specified by the right operand using …………. operator.
a) <<
b) >>
c) &&
d) ||
Answer:
a) <<

Question 127.
The value of the left operand is moved to right by the number of bits specified by the right operand using …………. operator.
a) <<
b) >>
c) &&
d) ||
Answer:
b) >>

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 128.
Right operand should be an unsigned integer for …………… operator.
a) Arithmetic
b) Relational
c) Bitwise Shift
d) None of these
Answer:
c) Bitwise Shift

Question 129.
………… is the bitwise one’s complement operator.
a) <<
b) >>
c) &&
d) ~
Answer:
d) ~

Question 130.
The bitwise ………….. operator inverts all the bits in a binary pattern, that is, all l’s become 0 and all 0’s become 1.
a) Shift left
b) Shift right
c) One’s complement
d) None of these
Answer:
c) One’s complement

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 131.
…………… is a unary operator.
a) Shift left
b) Shift right
c) Bitwise one’s complement
d) None of these
Answer:
c) Bitwise one’s complement

Question 132.
………….. operator is used to assigning a value to a variable which is on the left-hand side of an assignment statement.
a) Assignment
b) Logical
c) Bitwise
d) Conditional
Answer:
a) Assignment

Question 133.
…………. is commonly used as the assignment operator in all computer programming languages.
a) :=
b) ==
c) =
d) None of these
Answer:
c) =

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 134.
…………… operator copies the value at the right side of the operator to the left side variable,
a) Assignment
b) Logical
c) Bitwise
d) Conditional
Answer:
a) Assignment

Question 135.
The assignment operator is a(n) ……………….. operator.
a) Unary
b) Binary
c) Ternary
d) Conditional
Answer:
b) Binary

Question 136.
How many conditional operators are used in C++?
a) one
b) two
c) three
d) four
Answer:
a) one

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 137.
…………….. operator is a Ternary Operator.
a) Assignment
b) Logical
c) Bitwise
d) Conditional
Answer:
d) Conditional

Question 138.
…………… operator is used as an alternative to if … else control statement.
a) Assignment
b) Logical
c) Bitwise
d) Conditional
Answer:
d) Conditional

Question 139.
……………. is a pointer to a variable operator.
a) &
b) *
c) →
d) → *
Answer:
b) *

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 140.
…………… is an address operator.
a) &
b) *
c) →
d) →*
Answer:
a) &

Question 141.
……………. is a direct component selector operator.
a) .(dot)
b) *
c) →
d) →*
Answer:
a) .(dot)

Question 142.
…………… is an indirect component selector operator.
a) .(dot)
b) *
c) →
d) →*
Answer:
c) →

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 143.
…………. is a dereference operator.
a) . (dot)
b) .*
c) →
d) →*
Answer:
b) .*

Question 144.
……………… is a dereference pointer to class member operator.
a) . (dot)
b) .*
c) →
d) →*
Answer:
d) →*

Question 145.
……………. is a scope resolution operator.
a) .(dot)
b) .*
c) : :
d) →*
Answer:
c) : :

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 146.
The operands and the operators are grouped in a specific logical way for evaluation is called as………………
a) Operator precedence
b) Operator association
c) Hierarchy
d) None of these
Answer:
b) Operator association

Question 147.
Which operator is lower precedence?
a) Arithmetic
b) Logical
c) Relational
d) None of these
Answer:
b) Logical

Question 148.
Which operator is higher precedence?
a) Arithmetic
b) Logical
c) Relational
d) None of these
Answer:
a) Arithmetic

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 149.
Which operator is the lowest precedence?
a) Assignment
b) Comma
c) Conditional
d) Arithmetic
Answer:
b) Comma

Question 150.
In C++, asterisk ( * ) is used for ……………… purpose.
a) Multiplication
b) Pointer to a variable
c) Both A and B
d) None of these
Answer:
c) Both A and B

Question 151.
……………. punctuator indicates the start and the end of a block of code.
a) Curly bracket { }
b) Paranthesis ()
c) Sqaure bracket [ ]
d) Angle bracket < >
Answer:
a) Curly bracket { }

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 152.
……………. punctuator indicates function calls and function parameters.
a) Curly bracket { }
b) Paranthesis ()
c) Square bracket [ ]
d) Angle bracket < >
Answer:
b) Paranthesis ()

Question 153.
……………. punctuator indicates single and multidimensional arrays.
a) Curly bracket { }
b) Paranthesis ()
c) Square bracket [ ]
d) Angle bracket < >
Answer:
c) Square bracket [ ]

Question 154.
……………… punctuator is used as a separator in an expression.
a) Comma,
b) Semicolon;
c) Colon :
d) None of these
Answer:
a) Comma,

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 155.
Every executable statement in C++ should terminate with a ………..
a) Comma,
b) Semicolon;
c) Colon:
d) None of these
Answer:
b) Semicolon;

Question 156.
……………… punctuator is used to label a statement.
a) Comma,
b) Semicolon;
c) Colon:
d) None of these
Answer:
c) Colon:

Question 157.
………….. is a single line comment.
a) /I
b) /* ……..*/
c) \\
d) None of these
Answer:
a) /I

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 158.
……………… is a multi line comment.
a) //
b) /* */
c) \\
d) None of these
Answer:
b) /* */

Question 159.
C++ provides the operator to get input. .
a) >>
b) <<
c) ||
d) &&
Answer:
a) >>

Question 160.
…………….. operator extracts the value through the keyboard and assigns it to the variable on its right.
a) >>
b) <<
c) ||
d) &&
Answer:
a) >>

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 161.
………………. operator is called as “Stream extraction” or “get from” operator.
a) >>
b) <<
c) ||
d) &&
Answer:
a) >>

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 162.
Get from operator requires …………….. operands.
a) three
b) two
c) four
d) five
Answer:
b) two

Question 163.
…………….. is the operand of get from the operator.
a) Predefined identifier cin
b) Variable
c) Both A and B
d) None of these
Answer:
c) Both A and B

Question 164.
To receive or extract more than one value at a time ………… operator should be used for each variable.
a) >>
b) <<
c) ||
d) &&
Answer:
a) >>

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 165.
……………. is called cascading of operator.
a) >>
b) <<
c) 11 .
d) Both A and B
Answer:
d) Both A and B

Question 166.
C++ provides …………… operator to perform output operation. a) >>
b) <<
c) ||
d) &&
Answer:
b) <<

Question 167.
The operator ………….. is called the “Stream insertion” or “put to” operator.
a) >>
b) <<
c) ||
d) &&
Answer:
b) <<

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 168.
…………… operator is used to send the strings or values of the variables on its right to the object on its left. a) >>
b) <<
c) ||
d) &&
Answer:
b) <<

Question 169.
The second operand of put to operator may be a …………….
a) Constant
b) Variable
c) Expression
d) Either A or B or C
Answer:
d) Either A or B or C

Question 170.
To send more than one value at a time …………… operator should be used for each constant/ variable/expression.
a) >>
b) <<
c) ||
d) &&
Answer:
a) >>

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 171.
The compiler ignores …………… statement.
a) Comment
b) Input
c) Output
d) Assignment
Answer:
a) Comment

Question 172.
Usually all C++ programs begin with include statements starting with a ……………… symbol.
a) $
b) #
c) {
d) %
Answer:
b) #

Question 173.
The symbol …………… is a directive for the preprocessor.
a) $
b) #
c) {
d) %
Answer:
b) #

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 174.
_____ means, statements are processed before the compilation process begins.
a) Preprocessor
b) Include
c) Header file
d) None of these
Answer:
a) Preprocessor

Question 175.
The header file ……………… should include in every C++ program to implement input/output functionalities.
a) iostream
b) stdio
c) conio
d) math
Answer:
a) iostream

Question 176.
………….. header file contains the definition of its member objects cin and cout.
a) iostream
b) stdio
c) conio
d) math
Answer:
a) iostream

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 177.
Namespace collects identifiers used for …………..
a) Class
b) Object
c) Variables
d) All the above
Answer:
d) All the above

Question 178.
…………….. provides a method of preventing name conflicts in large projects.
a) namespace
b) header files
c) include
d) None of these
Answer:
a) namespace

Question 179.
Every C++ program must have a …………… function.
a) user defined
b) main( )
c) Library .
d) None of these
Answer:
b) main( )

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 180.
The …………….. function is the starting point where all C++ programs begin their execution.
a) user-defined
b) main ( )
c) Library
d) None of these
Answer:
b) main ( )

Question 181.
The executable statements should be inside the ………… function.
a) user-defined
b) main ( )
c) Library
d) None of these
Answer:
b) main ( )

Question 182.
The statements between the …………… braces are executable statements.
a) Curly bracket { }
b) Paranthesis ()
c) Square bracket [ ]
d) Angle bracket < >
Answer:
a) Curly bracket { }

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 183.
For creating and executing a C++ program, one must follow ……………. important steps.
a) two
b) three
c) five
d) four
Answer:
d) four

Question 184.
For creating and executing a C++ program, one must follow ……….. step.
a) Creating source code and save with .cpp extension
b) Compilation
c) Execution
d) All the above
Answer:
d) All the above

Question 185.
………………. links the library files with the source code and verifies each and every line of code.
a) Interpreter
b) Compiler
c) Loader
d) Assembler
Answer:
b) Compiler

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 186.
If there are no errors in the source code, …………… translates the source code into a machine-readable object file.
a) Interpreter
b) Compiler
c) Loader
d) Assembler
Answer:
b) Compiler

Question 187.
The compiler translates the source code into machine-readable object file with an extension…………..
a) .cpp
b) .exe
c) .obj *
d) None of these
Answer:
c) .obj *

Question 188.
The object file becomes an executable file with extension ……………
a) .cpp
b) .exe
c) .obj
d) None of these
Answer:
b) .exe

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 189.
………….. files can run without the help of any compiler or IDE.
a) Source
b) Object
c) Executable
d) None of these
Answer:
c) Executable

Question 190.
…………… makes it easy to create, compile and execute a C++ program.
a) Editors
b) IDE
c) Compilers
d) None of these
Answer:
b) IDE

Question 191.
IDE stands for …………….
a) Integrated Development Environment
b) Integrated Design Environment
c) Instant Development Environment
d) Integral Development Environment
Answer:
a) Integrated Development Environment

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 192.
……………. is open-source C++ compiler.
a) Dev C++ / Geany / Sky IDE
b) Code Lite / Code::blocks / Eclipse
c) Ner Beans / Digital Mars
d) All the above
Answer:
d) All the above

Question 193.
Dev C++ is written in …………
a) Delphi
b) C++
c) C
d) Pascal
Answer:
a) Delphi

Question 194.
………….. error is possible in C++.
a) Syntax
b) Semantic
c) Run-time
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 195.
………….. error occurs because of some illegal operation that takes place.
a) Syntax
b) Semantic
c) Run-time
d) All the above
Answer:
c) Run-time

Question 196.
Semantic error is called as ……………error.
a) Syntax
b) Logic
c) Run-time
d) All the above
Answer:
b) Logic

Question 197.
If a program tries to open a file which does not exist, it results in a …………. error.
a) Syntax
b) Logic
c) Run-time
d) All the above
Answer:
c) Run-time

Question 198.
……………. errors occur when grammatical rules of C++are violated.
a) Syntax
b) Logic
c) Run-time
d) All the above
Answer:
a) Syntax

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Very Short Answers (2 Marks)

Question 1.
Mention any two benefits of C++.
Answer:

  1. C++ is a highly portable language and is often the language of choice for multi-device, multi-platform app development.
  2. C++ is an object-oriented programming language and includes classes, inheritance, polymorphism, data abstraction, and encapsulation.

Question 2.
What is a character?
Answer:
A character represents any alphabet, number, or any other symbol (special characters) mostly available in the keyboard.

Question 3.
What are the types of C++ operators based on the number of operands?
Answer:
The types of C++ operators based on the number of operands are:

  1. Unary Operators – Require only one operand
  2. Binary Operators – Require two operands
  3. Ternary Operators – Require three operands

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 4.
What are the recent keywords included in C++?
Answer:
The recent list of keywords includes: using, namespace, bal, static_cast, const_cast, dynamic_cast, true, false.

Question 5.
What is a stream extraction operator?
Answer:
C++ provides the operator >> to get input. It extracts the value through the keyboard and assigns it to the variable on its right; hence, it is called as “Stream extraction” or “get from” operator.

Question 6.
Why the following identifiers are invalid?
a) num-add
b) this
c) 2myfile
Answer:
a) num-add – It contains spedal character (-) which ¡s not permitted
b) this – It is a keyword in C++. Keyword can not be used as identifier
c) 2myflle – Name must begin with an alphabet or an underscore.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 7.
What are the main types of C++ datatypes?
Answer:
In C++, the data types are classified into three main categories

  1. Fundamental data types
  2. User-defined data types
  3. Derived data types.

Question 8.
What are Boolean literals?
Answer:
Boolean literals are used to represent one of the Boolean values (True or false). Internally true has value 1 and false has value 0.

Question 9.
What are string literals?
Answer:
The sequence of characters enclosed within double quotes is called String literals. By default, string literals are automatically added with a special character ‘\0’ (Null) at the end. Valid string Literals: “A” “Welcome” “1234” Invalid String Literals : ‘Welcome’,’1234′

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 10.
Differentiate Operators and Operands.
Answer:
The symbols which are used to do some mathematical or logical operations are called as Operators.
The data items or values that the operators act upon are called as Operands.

Question 11.
What are the classifications of C++ operators based on operand requirements?
Answer:
In C++, the operators are classified on the basis of the number of operands as follows:
i) Unary Operators – Require only one operand
ii) Binary Operators – Require two operands
iii) Ternary Operators – Require three operands

Question 12.
List the C++ operators.
Answer:
C++ Operators are classified as:

  • Arithmetic Operators
  • Relational Operators
  • Logical Operators
  • Bitwise Operators
  • Assignment Operators
  • Conditional Operator
  • Other Operators ,

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 13.
Write note on increment and decrement operators.
Answer:
++ (Plus, Plus) Increment operator
– (Minus, Minus) Decrement operator
An increment or decrement operator acts upon a single operand and returns a new value. Thus, these operators are unary operators. The increment operator adds 1 to its operand and the decrement operator subtracts 1 from its operand.
Example:
x++ is the same as x = x+1; It adds 1 to the present value of x.
X– is the same as x = x—1; It subtracts 1 from the present value of x.

Question 14.
Write a note on bitwise operators.
Answer:
Bitwise operators work on each bit of data and perform the bit-by-bit operation.
In C++, there are three kinds of bitwise operators, which are:

  • Logical bitwise operators
  • Bitwise shift operators
  • One’s compliment operator

Question 15.
Write about bitwise one’s compliment operator.
Answer:
The Bitwise one’s compliment operator:
The bitwise One’s compliment operator ~(Tilde), inverts all the bits in a binary pattern, that is, all l’s become 0 and all 0’s become 1. This is a unary operator.
Example:
If a = 15; Equivalent binary values of a is 0000 1111
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 4

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 16.
Write about assignment operator.
Answer:
Assignment Operator:
The assignment operator is used to assigning a value to a variable which is on the left-hand side of an assignment statement. = (equal to) is commonly used as the assignment operator in all computer programming languages. This operator copies the value at the right side of the operator to the left side variable. It is also a binary operator.
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 5

Question 17.
What are the shorthand assignment operators? Give example.
Answer:

Operator

      Name of  Operator                                                         Example
+= Addition Assignment a = 10;
c = a+= 5;
(ie, a = a+5)
c = 15
-= Subtraction Assignment a = 10;
c = a-= 5;
(ie, a = a-5)
c = 5
* = Multiplication Assignment a = 10;
c = a*= 5;
(ie, a = a*5)
c = 50
/= Division Assignment a = 10;
c – a/= 5;
(ie, a = a/5)
c = 2
%= Modulus Assignment a = 10;
c = a%= 5;
(ie, a = a%5)
c = 0

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 18.
Write note on conditional or ternary operator.
Answer:
In C++, there is only one conditional operator is used. ?: is a conditional Operator. This is a Ternary Operator. This operator is used as an alternative to if… else control statement.

Question 19.
Write note on comma (, ) operator.
Answer:
The comma (,) is an operator in C++ used to bring together several expressions. The group of expressions separated by a comma is evaluated from left to right.

Question 20.
What are the pointer operators?
Answer:
* – Pointer to a variable operator
& – Address of operator

Question 21.
What are the component selection operators?
Answer:
. – Direct component selector operator
-> – Indirect component selector operator

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 22.
What are the class member operators?
Answer:
:: – Scope access / resolution operator
.* – Dereference operator
->* – Dereference pointer to class member operator

Question 23.
What is operator association?
Answer:
The operands and the operators are grouped in a specific logical way for evaluation. This logical grouping is called as an Association.

Question 24.
What are the cascading operators?
Answer:
Get from (>>) and Put to (<<) operators are cascading operators.

Question 25.
What are the popular C++ Compilers with IDE.
Answer:

Compiler

Availability

Dev C++ Open-source
Geany Open-source
Code:: blocks Open source
Code Lite Open-source
Net Beans Open-source
Digital Mars Open-source
Sky IDE Open-source
Eclipse Open-source

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Short Answers (3 Marks)

Question 1.
What are the benefits of C++?
Answer:
Benefits of learning C++:

  • c++ ¡s a highly portable language and ¡s often the language of choice for multi-device, multi- platform app development.
  • C++ is an object-oriented programming language and includes classes, inheritance, polymorphism, data abstraction and encapsulation.
  • C++ has a rich function library.
  • C++ allows exception handling, inheritance and function overloading which are not possible in C.
  • C++ is a powerful, efficient and fast language.

It finds a wide range of applications — from GUI applications to 3D graphics for games to real-time mathematical simulations.

Question 2.
What are the characters used In C++?
Answer:
C++ accepts the following characters:

Alphabets A …. Z, a…. z
Numeric 0 …. 9
Special Characters + – * / ~ ! @ # $ % A& [ ] ( ) {} = ><_\l?.,:'”;
White space Blank space, Horizontal tab (->), Carriage return (), Newline, Form feed
Other characters C++ can process any of the 256 ASCII characters as data.

Question 3.
What are Automatic conversion and Type promotion?
Answer:
Implicit type conversion is a conversion performed by the compiler automatically. So, the implicit conversion is also called “Automatic conversion”. This type of conversion is applied usually whenever different data types are intermixed in an expression. If the type of the operands differs, the compiler converts one of them to match with the other, using the rule that the “smaller” type is converted to the “wider” type, which is called “Type Promotion”.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 4.
What are the rules for naming an identifier/variable?
Answer:
Rules for naming an identifier:

  • The first character of an identifier must be an alphabet or an underscore (-).
  • Only alphabets, digits, and underscore are permitted. Other special characters are not allowed as part of an identifier.
  • c++ is case sensitive as it treats upper and lower-case characters differently.
  • Reserved words or keywords cannot be used as an identifier name.

Question 5.
List the kinds of literals in C++.
Answer:
C++ has several kinds of literals. They are:
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 6

Question 6.
What are the types of C++operators?
Answer:
C++ Operators are classified as:

  1. Arithmetic Operators
  2. Relational Operators
  3. Logical Operators
  4. Bitwise Operators
  5. Assignment Operators
  6. Conditional Operator
  7. Other Operators

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 7.
Write a note on character constants.
Answer:
A character constant is any valid single character enclosed within single quotes. A character constant in C++ must contain one character and must be enclosed within a single quote.
Valid character constants : ‘A’, ‘2\ ‘$’
Invalid character constants : “A”
The value of a single character constant has an equivalent ASCII value. For example, the value of’A’ is 65.

Question 8.
What are escape sequences? Explain.
Answer:
Escape sequences (or) Non-graphic characters:
C++ allows certain non-printable characters represented as character constants. Non-printable characters are also called non-graphical characters. Non-printable characters are those characters that cannot be typed directly from a keyboard during the execution of a program in C++.
For example: backspace, tabs etc. These non-printable characters can be represented by using escape sequences. An escape sequence is represented by a backslash followed by one or two characters.
Example: \t \On \xHn

Question 9.
Tabulate the escape sequence characters.
Answer:

Escape sequence

Non-graphical character

\a Audible or alert bell
\b Backspace
\f Form feed
\n Newline or linefeed
\r Carriage return
\t Horizontal tab
\v Vertical tab
\\ Backslash
\’ Single quote
\” Double quote
\? Question Mark
\On Octal number
\xHn Hexadecimal number
\o Null

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 10.
Write a note on arithmetic operators.
Answer:
Arithmetic operators perform simple arithmetic operations like addition, subtraction, multiplication, division etc.

Operator

Operation

Example

+ Addition 10 + 5 = 15
Subtraction 10 – 5 = 5
* Multiplication 10 * 5 = 50
/ Division 10 / 5 = 2 (Quotient of the division)
% Modulus (To find the reminder of a division) 10 % 3 = 1 (Remainder of the division)

Question 11.
What are the relational operators in C++? Give examples.
Answer:
Relational operators are used to determining the relationship between its operands. When the relational operators are applied on two operands, the result will be a Boolean value i.e 1 or 0 to represents True or False respectively. C++ provides six relational operators. They are:

Operator Operation Example
> Greater than a > b
< Less than a < b
>= Greater than or equal to a >= b
<= Less than or equal to a <= b
== Equal to a == b
j= Not equal a != b
  • In the above examples, the operand ‘a’ is compared with ‘b’ and depending on the relation, the result will be either 1 or 0. i.e., 1 for true, 0 for false.
  • All six relational operators are binary operators.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 12.
What are the logical operators used in C++? Explain its operation.
Answer:
A logical operator is used to evaluate logical and relational expressions. The logical operators act upon the operands that are themselves called as logical expressions. C++ provides three logical operators.
table

Operator

Operation

Description

&& AND The logical AND combines two different relational expressions into one. It returns 1 (True), if both expressions are true, otherwise, it returns 0 (False).
II OR The logical OR combines two different relational expressions into one. It returns 1 (True) if either one of the expressions is true. It returns 0 (False) if both the expressions are false.
! NOT NOT works on a single expression/operand. It simply negates or inverts the truth value, i.e., if an operand/expression is 1 (True) then this operator returns 0 (False) and vice versa.

AND, OR both are binary operators where as NOT is a unary operator.
Example:
a = 5, b = 6, c = 7;

Expression

Result

(a<b) && (b<c) 1 (True)
(a>b) && (b<c) 0 (False)
(a<b) || (b>c) 1 (True)
!(a>b) 1 (True)

Question 13.
What are the logical bitwise operators? Explain its operation.
Answer:
Logical bitwise operators:

  • & Bitwise AND (Binary AND)
  • | Bitwise OR (Binary OR)
  • ∧ Bitwise Exclusive OR (Binary XOR)
  • Bitwise AND (&) will return 1 (True)if both the operands are having the value 1 (True); Otherwise, it will return 0 (False).
  • Bitwise OR (|) will return 1 (True) if any one of the operands is having a value 1 (True); It returns 0 (False) if both the operands are having the value 0 (False).
  • Bitwise XOR(A) will return 1 (True) if only one of the operand is having a value of 1 (True). If both are True or both are False, it will return 0 (False).

The truth table for bitwise operators (AND, OR, XOR)

A B A & B A | B A ∧ B
1 1 1 1 0
1 0 0 1 1
0 1 0 1 1
0 0 0 0 0

Example:
If a = 65, b=15
Equivalent binary values of 65 = 0100 0001; 15 = 0000 1111
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 7

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 14.
What are the bitwise shift operators? Explain its operation.
Answer:
The Bitwise shift operators:
There are two bitwise shift operators in C++, Shift left (<<) and Shift right (>>).

  1. Shift left (<<) – The value of the left operand is moved to the left by the number of bits specified by the right operand. The right operand should be an unsigned integer.
  2. Shift right (>>) – The value of the left operand is moved to the right by the number of bits specified by the right operand. The right operand should be an unsigned integer.

Example:
If a =15; the Equivalent binary value of a is 0000 1111
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 8

Question 15.
What is input operator in C++? Explain.
Answer:
C++ provides the operator >> to get input. It extracts the value through the keyboard and
assigns it to the variable on its right; hence, it is called as “Stream extraction” or “get from” operator.
It is a binary operator i.e., it requires two operands. The first operand is the pre-defined identifier cin that identifies keyboard as the input device. The second operand must be a variable.
Working process of cin
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 9
Example:
cin>>num; — Extracts num value
cin>>x>>y; — Extracts x and y values

Question 16.
What is an output operator in C++? Explain.
Answer:
C+ + provides << operator to perform output operation. The operator << is called the “Stream insertion” or “put to” operator. It is used to send the strings or values of the variables on its right to the object on its left. << is a binary operator.
The first operand is the pre-defined identifier cout that identifies monitor as the standard output object. The second operand may be a
constant, variable or an expression.
Working process of cout
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 10
Example:
cout<<“Welcome”; – Display Welcome on-screen cout<<“The Sum =”<

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Explain in Detail 5 Marks

Question 1.
Explain Integer Constants. (or) Fixed point constants In detail.
Answer:
Integers are whole numbers without any fractions. An integer constant must have at least one digit without a decimal point. It may be signed or unsigned. Signed integers are considered as negative, commas and blank spaces are not allowed as part of it.
In C++, there are three types of integer constants:

  • Decimal
  • Octal
  • Hexadecimal

i) Decimal
Any sequence of one or more digits (0 …. 9).

Valid

Invalid

725 7,500 (Comma is not allowed)
-27 66 5 (Blank space is not allowed)
4.56 9$ (Special Character not allowed)

If we assign 4.56 as an integer decimal constant, the compiler will accept only the integer portion of 4.56 ie. 4. It will simply ignore .56.

ii) Octal:
Any sequence of one or more octal values (0 ….7) that begins with 0 is considered as an Octal constant.

Valid

Invalid

012 05,600 (Comma is not allowed)
-027 04.56 (A decimal point is not allowed)**
+0231 0158 (8 is not a permissible digit in the octal system)

iii) Hexadecimal:
Any sequence of one or more Hexadecimal values (0 …. 9, A …. F) that starts with Ox or OX is considered as a Hexadecimal constant.

Valid

Invalid

0x123 0x1,A5 (Comma is not allowed)
0X568 0x.l4E (Decimal point is not allowed like this)

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 2.
Explain Real Constants. (or) Floating-point constants in detail.
Answer:
Real Constants (or) Floating-point constants:
A real or floating-point constant is a numeric constant having a fractional component. These constants may be written ¡n fractional form or ¡n exponent form.
The fractional form of a real constant is a signed or unsigned sequence of digits including a decimal point between the digits.
It must have at least one digit before and after a decimal point. It may have a prefix with the + or – sign.
A real constant without any sign will be considered positive.
Exponent form of real constants consists of two parts:

  1. Mantissa
  2. Exponent

The mantissa must be either an integer or a real constant. The mantissa followed by a letter E or e and the exponent. The exponent should also be an integer.
For Example:
58000000.00 may be written as 0.58 x 108 or 0. 58E8.

Mantissa (Before E)

Exponent (After E)

0.58 8

Example:
5.864 E1 → 5.864 x 101 → 58.64
5864 E-2 → 5864 x 10-2 → 58.64
0.5864 E2 → 0.5864 x 102 → 58.64

Question 3.
Explain the prefix and postfix operators’ working process with suitable examples.
Answer:
The ++ or – operators can be placed either as prefix (before) or as postfix (after) to a variable. With the prefix version, C++ performs the increment / decrement before using the operand.
For example: N1=10, N2=20;
S = ++N1 + ++N2;
The following Figure explains the working process of the above statement.
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 11
In the above example, the value of num is first incremented by 1, then the incremented value is assigned to the respective operand.
With the postfix version, C++ uses the value of the operand in evaluating the expression before incrementing /decrementing its present value.
For example: N1=10, N2=20;
S = N1++ + ++N2;
The following Figure explains the working process of the above statement.
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 12
In the above example, the value assigned to operand N1 is taken into consideration, first and then the value will be incremented by 1.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 4.
What are punctuators/separators? List the punctuators and their operations.
Answer:
Punctuators are symbols, which are used as delimiters while constructing a C++ program. They are also called “Separators”. The following punctuators are used in C++.

Curly braces { } Opening and closing curly braces indicate the start and the end of a block of code. A block of code containing more than one executable statement. These statements together are called as “compound statement”. int main ()
{int x=10,
y=20, sum;
sum = x + y;
cout << sum;
}
Parenthesis () Opening and closing parenthesis indicate function calls and function parameters. clrscr();
add (5, 6);
Square brackets [ ] It indicates single and multidimensional arrays. int num[5];
charname[50];
Comma (,) It is used as a separator in an expression. int x=10, y=20, sum;
Semicolon ; Every executable statement in C++ should terminate with a semicolon. int main ()

{
int x=10, y=20, sum; sum = x + y; cout << sum; }

Colon : It is used to label a statement. private:
Comments
///* *1
Any statement that begins with // are considered a comments. Comments are simply ignored by compilers, i.e., compiler does not execute any statement that begins
with a // // Single line comment
/*  ………….. /  Multiline comment
/* This is written By
myself to learn CPP */ int main ()
{
intx=10,
y=20, sum;  // to sum x  and y  sum = x + y;
cout << sum;
}

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Evaluate Yourself

Question 1.
What is meant by literals? How many types of integer literals available in C++?
Answer:
Literals are data items whose values do not change during the execution of a program. Literals are called as Constants.
In C++, there are three types of integer literals (constants). They are:

  1. Decimal
  2. Octal
  3. Hexadecimal

Question 2.
What kind of constants is following?
i) 26
ii) 015
iii) 0xF
iv) 014.9
Answer:
i) 26 : Decimal constant
ii) 015 : Octal constant
iii) 0xF : Hexadecimal constant
iv) 014.9 : Integer Constant. (A fractional number that begins with 0, C++ has consider the number as an integer not an Octal)

Question 3.
What is the character constant in C++?
Answer:
A character constant is any valid single character enclosed within single quotes. A character constant in C++ must contain one character and must be enclosed within a single quote.
Valid character constants: ‘A’, ‘2’, ‘$’
Invalid character constants: “A”

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 4.
How are non-graphic characters represented in C++?
Answer:
Non-printable characters are also called as non-graphical characters.
Non-printable characters are those characters that cannot be typed directly from a keyboard during the execution of a program in C++, for example, backspace, tabs, etc. These non-printable characters can be represented by using escape sequences.

An escape sequence is represented by a backslash followed by one or two characters.

Escape Sequence

Non-graphical character

\a The audible or alert bell
\b Backspace
\f Form feed
\n Newline or linefeed
\r Carriage return
\t Horizontal tab
\v Vertical tab
\\ Backslash
V Single quote
\” Double quote
\On Octal number
\xHn Hexadecimal number
\0 Null

Even though an escape sequence contains two characters, they should be enclosed within single quotes because, C++ consider escape sequences as character constants and allocates one byte in ASCII representation.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 5.
Write the following real constants into exponent form:
i) 32.179
ii) 8.124
iii) 0.00007
Answer:
i) 32.179 → 3.2179E1 (OR) 0.32179E2 (OR) 32178E-3
ii) 8.124 → 0.8124E1 (OR) 8124E-3
iii) 0.00007 → 7E-5

Question 6.
Write the following real constants into fractional form:
i) 0.23E4
ii) 0.517E-3
iii) 0.5E-5
Answer:
i) 0.23E4 → 2300
ii) 0.517E-3 → 0.000517
iii) 0.5E-5 → 0.000005

Question 7.
What is the significance of the null (\0) character in a string?
Answer:
By default, string literals are automatically added with a special character ‘\0’ (Null) at the end. It is called as an end of string character.
The string “welcome” will actually be represented as “welcome\0” in memory and the size of this string is not 7 but 8 characters i.e., inclusive of the last character \0.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Evaluate Yourself

Question 1.
What is the use of operators?
Answer:
Operators are the symbols which are used to do some mathematical or logical operations on their operands.

Question 2.
What are binary operators? Give examples.
Answer:
Arithmetic binary operators.
Binary Operators – Require two operands.
The arithmetic operators addition(+), subtraction(-), multiplication(*), division(/) and Modulus(%) are binary operators which requires two operands.
Example:

Operator

Operation

Example

+ Addition 10 + 5 = 15
Subtraction 10 – 5 = 5 Slfil.r
* Multiplication 10 * 5 = 50
/ Division 10 / 5 = 2 (Quotient of the division)
% Modulus (To find the reminder of a division) 10 % 3 = 1 (Remainder of the division)

Question 3.
What does the modulus operator % do?
Answer:
The modulus operator is used to find the remainder of a division.
Example:
10%3 will return 1 which is the remainder of the division.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 4.
What will be the result of 8.5 % 2?
Answer:
The following error will appear while compiling the program.
Invalid operands of types ‘double’ and ‘int’ to binary ‘operator%’.
The reason is % operator operates on integer operands only.

Question 5.
Assume that R starts with a value of 35. What will be the value of S from the following expression? S=(R–)+(++R)
Answer:
S = 70

Question 6.
What will be the value of j = – – k + 2k. if k is ‘ 20 initially?
Answer:
The value of j will be 57 and k will be 19.
C++ Code;
#include
using namespace std;
int main()
{
int k=20,j;
j=–k+2*k;
cout<< “Vlaue of j=”<<j<< “\nVlaue of
k =”<<k;
return 0;
}
Out put
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 13

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 7.
What will be the value of p = p * ++j where j is 22 and p = 3 initially?
Answer:
The value of p is 69 and j is 23.
C++ program:
#include
using namespace std;
int main()
{
int j=22, p=3;
P = P * ++j;
cout<< “Value of p =”<<p<< “\nValue of
j =”<<j;
return 0;
}
Out put
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 14

Question 8.
Give that i = 8, j = 10, k = 8, What will be result of the following expressions?
i) i < k
ii) i < j
iii) i > = k
iv) i = = j
v) j ! = k
Answer:

Expression

Result

i < k 0 (False)
i < j 1 (True)
i >= k 1 (True)
i == j 0 (False)
j != k 1 (True)

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 9.
What will be the order of evaluation for the following expressions?
i) i + 3 > = j – 9
ii) a +10 < p – 3 + 2 q
Answer:
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 15

Question 10.
Write an expression involving a logical operator to test, if marks are 75 and grade is ‘A’.
Answer:
(marks == 75) && (grade == ‘A)

Hands On Practice

Type the following C++ Programs in Dev C++ IDE and execute, if the compiler shows any errors, try to rectify it and execute again and again till you get the expected result.
Question 1.
C++ Program to find the total marks of three
subjects.
#include
using namespace std;
int main()
{
int m1, m2, m3, sum;
cout << “\n Enter Mark 1:”; cin >> m1;
cout << ”\n Enter Mark 2: “; cin >> m2;
cout << “\n Enter Mark 3: “; cin >> m3;
sum = m1 + m2 + m3;
cout << “\n The sum = ” << sum;
}
Make changes in the above code to get the average of all the given marks.
Answer:
Modified Program:
#include
using namespace std;
int main()
{
int m1, m2, m3, sum;
float avg;
cout << “\n Enter Mark 1: “;
cin >> m1;
cout << “\n Enter Mark 2: “;
cin >> m2;
cout << “\n Enter Mark 3: “;
cin >> m3;
sum = m1 + m2 + m3;
avg = (float)sum / 3;
cout << “\n The sum = ” << sum;
cout << “\n The average = ” << avg;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 16

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 2.
C++ program to find the area of a circle.
#include
using namespace std;
int main()
{
int radius;
float area;
cout << “\n Enter Radius: “;
cin<< radius;
area = 3.14 * radius * radius;
cout << “\n The area of circle =“ <<area;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 17

Question 3.
Point out the errors in the following program:
Using namespace std;
int main( )
{
cout << “Enter a value”
cin << numl >> num2
num+num2=sum;
cout >> “\n The Sum= ” >> sum;
Answer:

Given code

Error

Using namespace std; The keyword must be in lowercase. So, Using should be written as using. Header file is missing.
int main() No Error
No Error
cout << “Enter a value “; Prompt should be “Enter two values” because cin contains two variables.
cin << numl >> num2 Variables are not declared. It should be declared first, cin must followed by Extraction operator(>>).

Semicolon is missing at the end of the statement.

num+num2=sum; Improper assignment statement and undefined variable name used. It should be replaced as sum=numl + num2;
cout >> “\n The Sum= ” >> sum; cout must followed by put to the operator.
Return 0; statement is missing. Close bracket} missing.

The correct program is given below:
using namespace std;
#include
int main()
{
int num1,num2,sum;
cout << “Enter two values”; cin >> numl >> num2;
sum= num+num2;
cout << “\n The Sum= “<< sum;
return 0;
}

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 4.
Point out the type of error in the following program:
#include
using namespace std;
int main()
{
int h=10; w=12;
cout << “Area of rectangle ” << h+w; >
Answer:
Syntax error exists. Ie. int h=10;w=12; should written as int h=10,w=12;
There is also a logical error in the above program.
The formula for rectangle area is given wrong. This error will not indicate by the compiler.
MODIFIED PROGRAM:
#include
using namespace std;
int main()
{
int h=10, w=12;
cout << “Area of rectangle ” << h*w;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 18

DATATYPES, VARIABLES AND EXPRESSIONS
Book Evaluation
Part -I

Choose The Correct Answer

Question 1.
How many categories of data types available in C++?
a) 5
b) 4
c) 3
d) 2
Answer:
c) 3

Question 2.
Which of the following data types is not a fundamental type?
a) signed
b) int
c) float
d) char
Answer:
a) signed

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 3.
What will be the result of following statement?
char ch= ‘B’;
cout << (int) ch;
a) B
b) b
c) 65
d) 66
Answer:
d) 66

Question 4.
Which of the character is used as suffix to indicate a floating point value?
a) F
b) C
c) L
d) D
Answer:
a) F

Question 5.
How many bytes of memory allocates for the following variable declaration if you are using Dev C++? short int x;
a) 2
b) 4
c) 6
d) 8
Answer:
a) 2

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 6.
What is the output of the following snippet?
char ch = ‘A’;
ch= ch + 1;
a) B
b) A1
c) F
d) 1A
Answer:
a) B

Question 7.
Which of the following Is not a data type modifier?
a) signed
b) int
c) long
d) short
Answer:
b) int

Question 8.
Which of the following operator returns the size of the data type?
a) size of( )
b) int ( )
c) long ( )
d) double ( )
Answer:
a) size of( )

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 9.
Which operator to be used to access a reference of a variable?
a) $
b) #
c) &
d) !
Answer:
c) &

Question 10.
This can be used as an alternate to end command:
a) \t
b) \b
c) \0
d) \n
Answer:
c) \0

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Part II

Very Short Answers

Question 1.
Write a short note const keyword with an example.
Answer:
const is the keyword used to declare a constant, const keyword modifies/restricts the accessibility of a variable. So, it is known as an Access modifier.
Example:
const int num =100; indicates that the variable num can not be modified. It remains constant.

Question 2.
What is the use of setw( ) format manipulator?
Answer:
setw ( ):
setw manipulator sets the width of the field assigned for the output. The field width determines the minimum number of characters to be written in the output.
Syntax:
setw(number of characters)
Example:
cout << setw(25) << “Net Pay : ” << setw(10)
<< np << endl;

Question 3.
Why is char often treated as an integer data type?
Answer:
Character data type is often said to be an integer type since all the characters are represented in memory by their associated ASCII Codes.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 4.
What is a reference variable? What is its use?
Answer:
A reference provides an alias for a previously defined variable. Declaration of a reference consists of base type and an & (ampersand) symbol; reference variable name is assigned the value of a previously declared variable.
Syntax:
<&reference_variable> =
Example:
#include
using namespace std;
int main( )
{
int num;
int &temp = num; //declaration of a reference variable temp
num = 100;
cout << “\n The value of num =” << num;
cout << “\n The value of temp =” << temp;
}
Output
The value of num = 100
The value of temp = 100

Question 5.
ConsIder the following C++ statement Are they equivalent?
char ch=67;
char ch=’C’;
Answer:
Yes. Both are equivalent. Both assignment statements will store character C’ in the variable ch.

Question 6.
what Is the difference between 561 and 56?
Answer:

  • 56 indIcate an Integer
  • 56L indicates Long Integer The suffix L indicates Long. So it stores a long integer

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 7.
Determine which of the following are valid constant? And specify their type,
i) 0.5
ii) ‘Name’
iii) ‘\t’
iv) 27,822
Answer:
i) 0.5 : Valid. Floating-point constant
ii) ‘Name’ : Invalid. String constant must be enclosed within double-quotes.
iii) ‘\t’ : Valid. Character constant.
iv) 27,822 : Invalid. Comma not allowed with integer constant.

Question 8.
Suppose x and y are two double-type variables that you want add as integers and assign to an integer variable. Construct a C++ statement for doing so.
Answer:
double x, y;
int sum;
x = 12.64;
y = 13.56;
sum = (int) x + (int) y;
The variable sum will have the value of 25 due to explicit casting.

Question 9.
What will be the result of following if num=6 initially?
Answer:
a) cout << num;
6
b) cout << (num==5);
0

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 10.
Which of the following two statements are valid? Why? Also write their result, int a;
i) a=3,014;
ii) a =(3,014);
Answer:
i) a=3,014; – Invalid. Special character comma(,) not allowed.
ii) a=(3,014); – Valid. 014 is an octal constant. It will be converted into decimal and then stored in a. So, a will hold 12 as its value.

Part – III

Short Answers

Question 1.
What are arithmetic operators in C++? Differentiate unary and binary arithmetic operators. Give example for each of them.
Answer:
Arithmetic Operators:
Arithmetic operators perform simple arithmetic operations like addition, subtraction, multiplication, division, etc.

Operator Operation Example
+ Addition 10 + 5-15
 – Subtraction 10-5-5
* Multiplication 10 * 5 = 50
/ Division 10 / 5 = 2 (Quotient of the division)
% Modulus (To find the reminder of a division) 10 % 3 = 1 (Remainder of the division)

The above-mentioned arithmetic operators are binary operators which require a minimum of two operands.

Unary arithmetic operators:
– (Unary) – The unary minus operator changes the sign of its argument. A positive number ‘ becomes negative and negative number becomes
positive, int a = 5;
a = -a; // a becomes -5
+ (Unary) – The unary plus operator keeps the sign of its argument,
int a = -5;
a = +a; // a still have the value same value -5
(No change)
a = 5;
a = +a; // a stil have the same value 5
(No change)
Unary Minus is different from – (Binary) ie. subtraction operator requires two operands.
Unary Plus is different from + (Binary) ie. addition operator requires two operands.
#include
mt mamo
{
mt x=10;
intÿ= -10;
inta = -10;
‘nt b = 10;
y=+y;
a= -a;
b=+b;
cout«”\nx = “«X;
cout«”\ny = “«y;
cout«”\na = “«a;
cout«”\nb = “«b;
return 0;
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 19

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 2.
Evaluate x+= x + ++x; Let x=5;
Answer:
x=18
Code:
using namespace std;
#include
int main ()
{

int x;
x = 5;
x+= x + ++x;
cout «x;
return O;
}
Out put
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 20

Question 3.
How relational operators and logical operators related to one another?
Answer:
Both relational and logical operators will give the evaluation result as Boolean constant value 1 (True) or 0(False).

Question 4.
Evaluate the following C++ expressions where x, y, z are integers and m, n are floating
point numbers. The value of x = 5, y = 4 and
m=2.5;
i) n=x+y/x;
n=5
ii)z=m*x+y;
z=16
iii) z = (x++) * m + X;
z = 18
Code:
using namespace std;
#include
int main()
{
int x,y,z1,z2;
float m,n;
x=5;
y=4;
m=2.5;
n = x + y / X;
z1=m*x+y;
z2 = (x++) * m + X;
cout<<”\nN = “<<n;
còut<<”\nzl =<<z1;
cout<<”\nz2 =<<z2;
return 0;
}
output
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 21

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

11th Computer Science Guide Introduction to C++ Additional Questions and Answers

Choose The Correct Answer 1 Mark

Question 1.
Every programming language has _____ fundamental element.
a) Data types
b) Variables
c) Both A and B
d) None of these
Answer:
c) Both A and B

Question 2.
c++ provides a predefined set of data types for handling the data item is known as …………….. data type.
a) Fundamental
b) Built-in data types
c) User-defined
d) Either A or B
Answer:
d) Either A or B

Question 3.
A programmer can create his own data types called as ______ data types.
a) Fundamental
b) Built-in data types
c) User defined
d) Either A or B
Answer:
c) User defined

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 4.
In a programming language, fields are referred as ……………
a) Variables
b) Data
c) File
d) None of these
Answer:
a) Variables

Question 5.
In a programming language, values are referred to as ……………
a) Variables
b) Data
c) File
d) None of these
Answer:
b) Data

Question 6.
In C++, the data types are classified as ______ main categories.
a) three
b) four
c) two
d) five
Answer:
a) three

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 7.
In C++, ______ is a data type category.
a) Fundamental
b) Derived
c) User defined
d) All the above
Answer:
d) All the above

Question 8.
The ………….. are the named memory locations to hold values of specific data types.
a) Literals
b) Variables
c) Constants
d) None of these
Answer:
b) Variables

Question 9.
There are ………….. fundamental (atomic) data types in C++.
a) two
b) three
c) four
d) five
Answer:
d) five

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 10.
…………… is an atomic data type in C++,
a) char / int
b) float / double
c) void
d) All the above
Answer:
d) All the above

Question 11.
………….. are whole numbers without any fraction.
a) Integers
b) Characters
c) Strings
d) None of these
Answer:
a) Integers

Question 12.
Identify the correct statement from the ; following.
a) Integers can be positive or negative.
b) If you try to store a fractional value in an int type variable it will accept only the integer portion of the fractional value.
c) If a variable is declared as an int, C++ compiler allows storing only integer values into it.
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 13.
……….. data type accepts and returns all valid \ ASCII characters.
a) Character
b) float
c) void
d) None of these
Answer:
a) Character

Question 14.
Character data type is often said to be an …………… type.
a) float
b) string
c) void
d) int
Answer:
d) int

Question 15.
……………… means significant numbers after decimal point.
a) Precision
b) Digit
c) Floating point
d) None of these
Answer:
a) Precision

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 16.
The _____ data type is larger and slower than type float.
a) Char
b) double
c) void
d) int
Answer:
b) double

Question 17.
The literal meaning for void is …………….
a) Empty space
b) Nothing
c) Blank
d) None of these
Answer:
a) Empty space

Question 18.
In C++, the ……………. data type specifies an empty set of values.
a) Char
b) double
c) void
d) int
Answer:
c) void

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 19.
……………. is used as a return type for functions that do not return any value.
a) Char
b) double
c) void
d) int
Answer:
c) void

Question 20.
Identify the correct statement from the following.
a) One of the most important reason for declaring a variable as a particular data type is to allocate appropriate space in memory.
b) As per the stored program concept, every data should be accommodated in the main memory before they are processed)
c) C++ compiler allocates specific memory space for each and every data handled according to the compiler’s standards.
d) All the above
Answer:
d) All the above

Question 21.
char data type needs ……………. bytes of memory.
a) 8
b) 4
c) 2
d) 1
Answer:
d) 1

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 22.
int data type needs ………….. bytes of memory.
a) 8
b) 4
c) 2
d) 1
Answer:
c) 2

Question 23.
float data type needs …………….. bytes of memory.
a) 8
b) 4
c) 2
d) 1
Answer:
b) 4

Question 24.
double data type needs ………… bytes of memory.
a) 8
b) 4
c) 2
d) 1
Answer:
a) 8

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 25.
The range of char data type is ………………
a) -127 to 128
b) -32,768 to 32,767
c) 3.4 x 10-38 to 3.4 x 1038 -1
d) 1.7 x 10-308 to 1.7 x 10308 -1
Answer:
a) -127 to 128

Question 26.
The range of int data type is …………..
a) -127 to 128
b) -32,768 to 32,767
c) 3.4 x HT38 to 3.4 x 1038-1
d) 1.7 x 10-308 to 1.7 x 10308 -1
Answer:
b) -32,768 to 32,767

Question 27.
The range of float data type is ……………
a) -127 to 128
b) -32,768 to 32,767
c) 3.4 x 10-38 to 3.4 x 1038 -1
d) 1.7 x lO”308 to 1.7 x 10308 -1
Answer:
c) 3.4 x 10-38 to 3.4 x 1038 -1

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 28.
The range of double data type is …………….
a) -127 to 128
b) -32,768 to 32,767
c) 3.4 x 10″38 to 3.4 x 1038-1
d) 1.7 x 10-308 to 1.7 x 10308 -1
Answer:
d) 1.7 x 10-308 to 1.7 x 10308 -1

Question 29.
…………….. can be used to expand or reduce the memory allocation of any fundamental data type.
a) Modifiers
b) Access specifiers
c) Promoters
d) None of these
Answer:
a) Modifiers

Question 30.
………….. are called as Qualifiers.
a) Modifiers
b) Access specifiers
c) Promoters
d) None of these
Answer:
a) Modifiers

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 31.
There are …………….modifiers used in C++.
a) five
b) four
c) three
d) two
Answer:
b) four

Question 32.
……………… is a modifier in C++,
a) signed / unsigned
b) long
c) short
d) All the above
Answer:
d) All the above

Question 33.
short data type needs …………. bytes of memory.
a) 8
b) 4
c) 2
d) 1
Answer:
c) 2

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 34.
unsigned short data type needs ………….. bytes of memory. .
a) 8
b) 4
c) 2
d) 1
Answer:
c) 2

Question 35.
signed short data type needs…………… bytes of memory.
a) 8
b) 4
c) 2
d) 1
Answer:
c) 2

Question 36.
signed long data type needs ……………. bytes of memory.
a) 8
b) 4
c) 2
d) 1
Answer:
b) 4

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 37.
The range of unsigned short is …………..
a) -32,768 to 32768
b) 0 to 65535
c) -2,147,483,648 to 2,147,483,647
d) 0 to 4,294,967,295
Answer:
b) 0 to 65535

Question 38.
The range of unsigned long is ……………..
a) -32,768 to 32768
b) 0 to 65535
c) -2,147,483,648 to 2,147,483,647
d) 0 to 4,294,967,295
Answer:
d) 0 to 4,294,967,295

Question 39.
The range of signed long is ……………..
a) -32,768 to 32768
b) 0 to 65535
c) -2,147,483,648 to 2,147,483,647
d) 0 to 4,294,967,295
Answer:
c) -2,147,483,648 to 2,147,483,647

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 40.
The range of unsigned char is …………….
a) -32,768 to 32768
b) 0 to 65535
c) 0 to 255
d) 0 to 4,294,967,295
Answer:
c) 0 to 255

Question 41.
The range of long double data type is ……………..
a) -127 to 128
b) -32,768 to 32,767
c) 3.4 x 10^932 to 1.1 x 104932 -1
d) 1.7 x 10~308 to 1.7 x 10308 -1
Answer:
c) 3.4 x 10^932 to 1.1 x 104932 -1

Question 42.
int data type needs …………. bytes of memory in Dec C++.
a) 8
b) 4
c) 2
d) 1
Answer:
b) 4

Question 43.
unsigned int data type needs ……………… bytes of memory in Dec C++.
a) 8
b) 4
c) 2
d) 1
Answer:
b) 4

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 44.
signed int data type needs …………… bytes of memory in Dec C++.
a) 8
b) 4
c) 2
d) 1
Answer:
b) 4

Question 45.
long double data type needs…………… memory in Dec C++.
a) 10
b) 8
c) 2
d) 12
Answer:
d) 12

Question 46.
long double data type needs…………… memory in Turbo C++.
a) 10
b) 8
c) 2
d) 12
Answer:
a) 10

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 47.
…………….. is an operator which gives the size of a data type.
a) sizeof()
b) byteof()
c) datatype()
d) None of these
Answer:
a) sizeof()

Question 48.
The suffix……………. is used for floating point values
a) U
b) L
C) F
d) None of these
Answer:
C) F

Question 49.
The suffix ……………… is used for long int values.
a) U
b) L
C) F
d) None of these
Answer:
b) L

Question 50.
The suffix ………….. is used for unsigned int
a) U
b) L
C) F
d) None of these
Answer:
a) U

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 51.
……………… are user-defined names assigned to specific memory locations in which the values are stored.
a) Literals
b) Variables
c) Operators
d) None of these
Answer:
b) Variables

Question 52.
There are ………….. values associated with a symbolic variable
a) two
b) three
c) four
d) five
Answer:
a) two

Question 53.
…………… is data stored in a memory location.
a) L-value
b) R-value
c) T-value
d) B-value
Answer:
b) R-value

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 54.
…………… is the memory address in which the R-value is stored.
a) L-value
b) R-value
c) T-value
d) B-value
Answer:
a) L-value

Question 55.
The memory addresses are in the form of ……………. values.
a) Binary
b) Octal
c) Decimal
d) Hexadecimal
Answer:
d) Hexadecimal

Question 56.
Every …………. should be declared before they are actually used in a program.
a) Variable
b) Operand
c) Literals
d) None of these
Answer:
a) Variable

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 57.
If we declare a variable without any initial value, the memory space allocated to that variable will be occupied with some unknown value is called as ………….. values.
a) Junk
b) Garbage
c) Either A or B
d) None of these
Answer:
c) Either A or B

Question 58.
A variable can be initialized during the execution of a program is known as ……………..
a) Dynamic initialization
b) Static initialization
c) Random initialization
d) None of these
Answer:
a) Dynamic initialization

Question 59.
………….. is the keyword used to declare a constant.
a) constant
b) const
c) cons
d) None of these
Answer:
b) const

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 60.
…………… keyword modifies / restricts the accessibility of a variable.
a) constant
b) const
c) cons
d) None of these
Answer:
b) const

Question 61.
……………….. is known as Access modifier of a variable.
a) constant
b) const
c) cons
d) None of these
Answer:
b) const

Question 62.
Declaration of a reference consists of ……………..
a) Base type
b) An 8i (ampersand) symbol
c) Both A and B
d) None of these
Answer:
c) Both A and B

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 63.
……………. are used to format the output of any
C++ program,
a) Qualifiers
b) Modifiers ‘
c) Manipulators
d) None of these
Answer:
c) Manipulators

Question 64.
ManIpulators are functions specifically designed to use with the ______ operators.
a) Insertion («)
b) Extraction(»)
c) Both A and B
d) None of these
Answer:
c) Both A and B

Question 65.
Commonly used manipulator is …………..
a) endl and setw
b) setfill
c) setprecision and setf
d) All the above
Answer:
d) All the above

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 66.
endl manipulator is a member of  ………………….. header file.
a) iomanip
b) iostream
c) manip
d) conio
Answer:
b) iostream

Question 67.
setw, setfihl, setprecision and setf manipulators are members of______ header file.
a) iomanip
b) iostream
c) manip
d) conio
Answer:
a) iomanip

Question 68.
______ is used asa line feeder in C++.
a) setw
b) setfill
c) endi
d) setf
Answer:
c) endi

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 69.
______ can be used as an alternate to ‘sn’.
a) setw
b) setfill
c) endi
d) setf
Answer:
c) endi

Question 70.
______ inserts a new line and flushes the buffer.
a) setw
b) setfill
c) endi
d) setf
Answer:
c) endi

Question 71.
______ manipulator sets the width of the field assigned for the output.
a) setw
b) setñhl
c) endi
d) setf
i.) IIUI
U) SeIT
Answer:
a) setw

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 72.
_______ manipulator is usually used after setw.
a) endl
b) setfill
c) endl
d) setf
Answer:
b) setfill

Question 73.
______ is used to display numbers with fractions In specific number of digits.
a) ‘endI
b) setfill i1
c) endl
d) setprecision
Answer:
d) setprecision

Question 74.
setf() manipulator may be used in form…………..
a) Fixed
b) Scientific
c) Both A and B
d) None of these
Answer:
c) Both A and B

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 75.
An expression ¡s a combination of ……………………… arranged as per the rules of C++.
a) Operators
b) Constants
c) Variables
d) All the above
Answer:
d) All the above

Question 76.
InC++,there are ………………………….. types of expressions used.
a) four
b) five
c) seven
d) two
Answer:
c) seven

Question 77.
The process of converting one fundamental type into another is called as …………………………
a) Type Conversion
b) Compiling
c) Inverting
d) None of these
Answer:
a) Type Conversion

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 78.
c++ provides …………………… types of conversions
a) three
b) two
c) four
d) five
Answer:
b) two

Question 79.
C++ provides _____types of conversion.
a) Implicit
b) Explicit
c) Both A and B
d) None of these
Answer:
c) Both A and B

Question 80.
A(n) ………………………. type conversion is a conversion performed by the compiler automatically.
a) Implicit
b) Explicit
c) BothAandB
d) None of these
Answer:
a) Implicit

Question 81.
______conversion is also called as Automatic conversion.
a) Implicit ‘
c) BothAandB
b) Explicit
d) None of these
Answer:
a) Implicit ‘

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 82.
Data of smaller type  converted to the wider type, which is called is as ………………
a) Type Promotion
c) Type extended
b) Type upgrade
d) None of these
Answer:
a) Type Promotion

Question 83.
c++ allows explicit conversion of variables or expressions from one data type to another specific data type by the programmer Is called as ………….
a) Type Promotion
b) Type upgrade
c) Type casting
d) None of these
Answer:
c) Type casting

Very Short Answers 2 Marks

Question 1.
What are the classification of data types?
Answer:
In C++, the data types are classified as three main categories.

  1. Fundamental data types
  2. User-defined data types and
  3. Derived data types.

Question 2.
Define: Variable.
Answer:
The variables are the named memory locations to hold values of specific data types.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 3.
Give the syntax for declaring a variable with an example.
Answer:
Syntax for declaring a variable:
Example:
int num1;
int num1, num2, sum;

Question 4.
What a the fundamental/atomic data types in C++?
Answer:
Fundamental (atomic) data types are predefined data types available with C++. There are five fundamental data types in C++: char, int, float, double and void.

Question 5.
Write about int data type.
Answer:
Integers are whole numbers without any fraction. Integers can be positive or negative. Integer data type accepts and returns only integer numbers.
If a variable is declared as an int, C++ compiler allows storing only integer values into it.
If we try to store a fractional value in an int type variable it will accept only the integer portion of the fractional value.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 6.
What are the advantages of using float data type?
Answer:
There are two advantages of using float data types.

  1. They can represent values between the integers.
  2. They can represent a much greater range of values.

Question 7.
What is the disadvantage of using float data type?
Answer:
The floating point operations takes more time to execute compared to the integer type ie., floating point operations are slower than integer operations. This is a disadvantage of floating point operation.

Question 8.
What do you mean by precision?
Answer:
Precision means significant numbers after decimal point of floating point number.

Question 9.
Tabulate the memory allocation for fundamental data types?
Answer:
Memory allocation for fundamental data types

Data type

Space in memory

in terms of bytes in terms of bits
char 1 byte 8 bits
int 2 bytes 16 bits
float 4 bytes 32 bits
double 8 bytes’ 64 bits

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 10.
Tabulate the range of value for fundamental data types?
Answer:

Data type

Range of value

char -127 to 128
int -32,768 to 32,767
float 3.4×10--38 to 3.4×1038 -1
double 1.7×10--308 to 1.7xl0308-1

Question 11.
What is modifier?
Answer:
Modifiers can be used to modify the memory allocation of any fundamental data type. They are also called as Qualifiers.

Question 12.
What are the modifiers in C++?
Answer:
There are four modifiers used in C++.
They are;

  1. signed
  2. unsigned
  3. long
  4. short

Question 13.
What are the two values associated with a variable?
Answer:
There are two values associated with a symbolic variable; they are R-value and L-va!ue.

  • R-value is data stored in a memory location.
  • L-value is the memory address in which the R-value is stored.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 14.
How memory addresses are represented?
Answer:
The memory addresses are in the form of Hexadecimal values.
Example: .
0x134e represents a memory address.

Question 15.
What are garbage or junk values?
Answer:
If we declare a variable without any initial value, the memory space allocated to that variable will be occupied with some unknown value. These unknown values are called as “Junk” or “Garbage” values.

Question 16.
What do you mean by dynamic ¡nitialization
Answer:
A variable can be initialized during the execution of a program. It is known as “Dynamic
initiaIization’
For example: .
int sum = num1+num2;
This initializes sum using the known values of num1 and num2 during the execution.

Question 17.
What is the difference between reference and pointer variable?
Answer:
A reference is an alias for another variable whereas a pointer holds the memory address of a variable.

Question 18.
What is the purpose of manipulators in C++?
Answer:
Manipulators are used to format the output of any C++ program. Manipulators are functions specifically designed to use with the insertion (<<) and extraction>>) operators.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 19.
What are the manipulators used in C++?
Answer:
Commonly used manipulators are:
endl, setw, setfill, setprecision and setf.

Question 20.
Write about the endl manipulator.
Answer:
endl (End the Line)
endl is used as a line feeder in C++. It can be used as an alternate to ‘\n’. In other words, endl inserts a new line and then makes the cursor to point to the beginning of the next line.
Example:
cout << “The value of num = ” << num <<endl;

Question 21.
What is the difference between endl and \n.
Answer:
There is a difference between endl and ‘\n’, even though they are performing similar tasks.
endl – Inserts a new line and flushes the buffer (Flush means – clean)
‘\n’ – Inserts only a new line.

Question 22.
Write about setw( ) manipulator.
Answer:
setw ( ) :
setw manipulator sets the width of the field assigned for the output. The field width determines the minimum number of characters to be written in output.
Syntax: ‘
setw(number of characters)
Example:
cout<< setw(25) << “Basic Pay :”<< setw(10)<< basic<< endl;

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 23.
What is the use of setfill( ) manipulator? setfill ():
Answer:
This manipulator is usually used after setw. If the presented value does not entirely fill the given width, then the specified character in the setfill argument is used for filling the empty fields.
Syntax:
setfill (character);
Example:
cout<<“\n H.R.A :”<<setw(10)< For example, if we assign 1200 to hra, setw accommodates 1200 in a field of width 10 from right to left and setfill fills p in the remaining 6 spaces that are in the beginning. The output will be, 0000001200.

Question 24.
What is the purpose of setprecision() manipulator?
Answer:
setprecision ( ):
This is used to display numbers with fractions in specific number of digits.
Syntax:
setprecision (number of digits);
Example:
float hra = 1200.123;
cout << setprecision (5) << hra;
In the above code, the given value 1200.123 will be displayed in 5 digits including fractions. So, the output will be 1200.1
setprecision ( ) prints the values from left to right. For the above code, first, it will take 4 digits and then prints one digit from fractional portion.

Question 25.
WhIch of the following statements are valid? Why? Also write their result
Inta; .
i) a – (014,3);
ii) a = (5,017)
iii) a = (3,018)
Answer:
i) a = (014,3); – Valid. A will hold 3. (The second value)
ii) a = (5,017) – Valid. 014 ¡s an octal constant. It will be converted into decimal and then stored in a. So, a will hold 15 as its value.
iii) a = (3,018) – Invalid. Because 8 is not an octal digit. (A number starts with 0 is considered as an octal)

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 26.
Which of the following statements are valid? Why? Also write their result.
inta;
i) a = (3,0xA);
ii) a = (5,0xCAFE)
iii) a = (OXCAFE,0XF)
iv) a = (0XCAFE,0XG)
Answer:
i) a = (3,0xA):
Valid. OxA is a hexadecimal constant. It will be converted into decimal and then stored in a. So, a will hold 10 as its value.
ii) a = (5,0xCAFE):
Valid. OxCAFE is a hexadecimal constant. It will be converted into decimal and then stored in a. So, a will hold 51966 as its value.
iii) a = (OXCAFE,0XF):
Valid. 0XF is a hexadecimal constant. It will be converted into decimal and then stored in a. So, a will hold 15 as its value.
iv) a= (OXCAFE,0XGAB):
Invalid. Because G is not a hexadecimal digit in OXGAB.\

Short Answer 3 Marks

Question 1.
LIstthedattypesinC++.
Answer:
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 22

Question 2.
Write about character data type.
Answer:
Character data type accepts and returns all valid ASCII characters. Character data type is often said to be an integer type, since ail the characters are represented in memory by their associated ASCII Codes.
If a variable is declared as char, C++ allows storing either a character or an integer value.
Example:
char c=65;
char ch = ‘A’; Both statements will assign ‘A’ to c and ch.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 3.
Write note on double data type.
Answer:
double data type:
This data type is for double precision floating point numbers. The double is also used for handling floating point numbers. But, this type occupies double the space than float type. This means, more fractions can be accommodated in double than in float type.
The double is larger and slower than type float. The double is used in a similar way as that of float data type.

Question 4.
Compare memory allocation by Turbo C++ and Dev C++.
Answer:

Data type Memory size in bytes
Turbo C++ Dev C++
short 2 2
unsigned short 2 2
signed short 2 2
int 2 4
unsigned int 2 4
signed int 2 4
long 4 4
unsigned long 4 4
signed long 4 4
char 1 1
unsigned char 1 1
signed char 1 1
float 4 4
double 8 8
long double 10 12

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 5.
What is the purpose of number suffix in C++?
Answer:
There are different suffixes for integer and floating point numbers. Suffix can be used to assign the same value as a different type.
For example, if we want to store 45 in an int, long, unsigned int and unsigned long int, you can use suffix letter L or U (either case) with 45 i.e. 45L or 45U.
This type of declaration instructs the compiler to store the given values as long and unsigned.
‘F’ can be used for floating point values, example: 3.14F

Question 6.
How setprecision( ) is used to set the number of decimal places?
Answer:
setprecision can also be used to set the number of decimal places to be displayed. In order to do this task, we will have to set an ios flag within setf( ) manipulator.
This may be used in two forms:
(i) fixed and
(ii) scientific.
These two forms are used when the keywords fixed or scientific are appropriately used before the setprecision manipulator.
Example:
#include
#indude
using namespace std;
int main()
{
cout.setf(ios::fixed);
cout << setprecision(2)<<0.1;
}
In the above program, ios flag is set to fixed type; it prints the floating point number in fixed notation. So, the output will be, 0.10
cout.setf(ios: scientific); cout << setprecision(2) << 0.1;
In the above statements, ios flag is set to scientific type; it will print the floating point number in scientific notation. So, the output wiil
be, 1.00e-001

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Explain In Detail 5 Marks

Question 1.
What is an expression? Explain its types with suitable example.
Answer:
An expression is a combination of operators, constants and variables arranged as per the rules of C++.
An expression may consist of one or more operands, and zero or more operators to produce a value. In C++, there are seven types of expressions as given below.

Expression

Description

Example

1.Constant Expression Constant expression consist only constant values int num=100;
2. Integer Expression The combination of integer and character values and/or variables with simple arithmetic operators to produce integer results. sum = num1 +

num2;

avg=sum/5;

3. Float Expression The combination of floating point values and/or variables with simple                 arithmetic operators to produce floating point results. Area=3.14*r*r;
4. Relational Expression The combination of values and/or variables with relational operators to produce bool(true means 1 or false means 0) values as results. x>y;

a+b==c+d;

5. Logical Expression The combination of values and/or variables with Logical operators to produce bool values as results. (a>b)&& (c= = 10);
6. Bitwise Expression The combination of values and/or variables with Bitwise operators. x>>3;

a<<2;

7. Pointer Expression A Pointer is a variable that holds a memory address. Pointer                declaration statements. int *ptr;

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 2.
Explain type conversion in detail.
Answer:
The process of converting one fundamental type into another is called as “Type Conversion”. C++ provides two types of conversions.

  1. Implicit type conversion
  2. Explicit type conversion

Implicit type conversion:
An Implicit type conversion is a conversion performed by the compiler automatically. So, implicit conversion is also called as “Automatic
conversion “.
This type of conversion is applied usually whenever different data types are intermixed in an expression. If the type of the operands differs, the compiler converts one of them to match with the other, using the rule that the “smaller” type is
converted to the “wider” type, which is called as “Type Promotion”
Example:
#include<iostream>
using namespace std;
int main()
{
int a=6;
float b =3.14;
cout << a+b
}
In the above program, operand ‘a’ ¡s an mt type and ‘b’ is a float type. During the execution of the program, ‘mt’ is converted into a ‘float because a float is wider than mt.
Hence, the output of the above program will be: 9.14
Explicit type conversion:
C++ allows explicit conversion of variables
or expressions from one data type to another
specific data type by the programmer. It is called
as “type casting”.
Syntax:
(type-name) expression;
Where type-name is a valid C++ data type to which the conversion is to be performed.
Example:
#include<iostream>
using namespace std;
int main ()
{
float varf=78.685;
cout << (int) varf;
}
In the above program, variable varf is declared as a float with an initial value 78.685. The value of varf is explicitly converted to an int type in cout statement. Thus, the final output will be 78.
During explicit conversion, if we assign a value to a type with a greater range, it does not cause any problem. But, assigning a value of a larger type to a smaller type may result in loosing or loss of precision values.
Example:
#include <iostream>
using namespace std;
int main()
{
double varf= 178.25255685;
cout << (float) varf < < endl;
cout << (int) varf << endl;
}
Output
178.253
178

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Evaluate Yourself

Question 1.
What do you mean by fundamental data types?
Answer:
C++ provides a predefined set of data types for handling the data items. Such data types are known as fundamental or built-in data types.

Question 2.
The data type char is used to represent characters. Then why is it often termed as an integer type?
Answer:
Character data type is often said to be an integer type, since all the characters are represented in memory by their associated ASCII Codes.

Question 3.
What is the advantage of floating point numbers over integers?
Answer:
Advantages of using float data types.

  • They can represent values between the integers.
  • They can represent a much greater range of values.

Question 4.
The data type double is another floating point type. Then why is it treated as a distinct data type?
Answer:
The double is also used for handling floating point numbers. But, this type occupies double the space than float type. This means, more fractions can be accommodated in double than in float type.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 5.
What is the use of void data type?
Answer:
The literal meaning for void is ’empty space’. In C++, the void data type specifies an empty set of values. It is used as a return type for functions that do not return any value.

Evaluate Yourself

Question 1.
What is modifiers? What is the use of modifiers?
Answer:
Modifiers are used to modify the storing capacity of a fundamental data type except void type.
For example, int data type can store only two bytes of data. In reality, some integer data may have more length and may need more space in memory. In this situation, we should modify the memory space to accommodate large integer values. .
Modifiers can be used to modify the memory allocation of any fundamental data type. They are also called as Qualifiers.

Question 2.
What is wrong with the following C++ statement?
Answer:
long float x;
The modifier long must be associated with only double.

Question 3.
What Is variable? Why a variable called symbolic variable?
Answer:
Variables are user-defined names assigned to specific memory locations in which the values are stored. Variables are also identifiers; and hence,
the rules for naming the identifiers should be followed while naming a variable.
These are called as symbolic variables because these are named locations.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 4.
What do you mean by dynamic initialization of a variable? Give an example.
Answer:
A variable can be initialized during the execution of a program. It is known as Dynamic
initialization.
For example:
int sum = num1+num2;
This initializes sum using the known values of num1 and num2 during the execution.

Question 5.
What is wrong with the following statement?
Answer:
const int x ;
In the above statement x must be initialized. It is missing. It may rewritten as
const mt x =10;

Evaluate Yourself

Question 1.
What is meant by type conversion?
Answer:
The process of converting one fundamental type into another is called as “Type Conversion”. C++ provides two types of conversions.

  1. Implicit type conversion
  2. Explicit type conversion

Question 2.
How implicit conversion different from explicit conversion?
Answer:
An Implicit type conversion is a conversion performed by the compiler automatically. Implicit conversion is also called as “Automatic conversion”.
An explicit conversion of variables or expressions from one data type to another specific data type is by the programmer. It is called as “type casting”.

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 3.
What is difference between endl and \n?
Answer:
There is a difference between endl and ‘\n’ even though they are performing similar tasks.
endl – Inserts a new line and flushes the buffer (Flush means – dean)
‘\n’ – Inserts only a new line.

Question 4.
What is the use of references?
Answer:
A reference provides an alias for a previously defined variable. Declaration of a reference consists of base type and an & (ampersand) symbol; reference variable name is assigned the value of a previously declared variable.
Syntax:
<&reference_variable>=

Question 5.
What is the use of setprecision ( )?
Answer:
setprecision ( ):
This is used to display numbers with fractions in specific number of digits.
Syntax:
setprecision (number of digits);
Example:
float hra = 1200.123;
cout << setprecision (5) << hra;
The given value 1200.123 will be displayed in 5 digits including fractions. The output will be 1200.1

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Hands On Practice

Question 1.
Write C++ programs to interchange the values of two variables.
a) Using with third variable C++PROGRAM:
#include
using namespace std;
int main()
{
intx,y,t;
cout<<“\nEnter two numbers”; cin>>x>>y;
cout<<“\nValues before interchage
x=”<<x<<“\ty=”<<y;
t=x;
x=y;
y=t;
cout<<“\nValues after interchage x=”<<x<<“\ty=”<<y;
return 0;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 23

b) Without using third variable C++ PI OGRAM:
#include
using namespace std;
int main ()
{
int x,y;
cout<<“\nEnter two numbers”; cin>>x>>y;
cout<<“\nValues before interchage
x=”<<x<<“\ty=”<<y;
//interchage process without using third
variable
x=x+y;
y=x-y;
x=x-y;
cout<<“\nValues after interchage x=”<<x<<“\ty=”<<y;
return 0;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 24

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 2.
Write C++ programs to do the following:
a) To find the perimeter and area of a quadrant.
C++ PROGRAM:
#include
using namespace std;
int mainQ()
{
float ppm,area;
cout<<“\nEnter radius cin>>r;
area = 3.14 * r * r / 4;
pm = 3.14 * r / 2;
cout<<“\nQuadrant Area = “<<area;
cout<<“\n\nQuadrant Perimeter = “<<pm;
return 0;
}
OutPut
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 25

b) To find the area of triangle.
C++ PROGRAM 1:
(Area of triangle when b and h values are known)
#include
using namespace std;
int main()
{
float b,h,area;
cout<<“\nEnter b and h value of triangle cin>>b>>h;
// Area of triangle when b and h values are known
area = b * h / 2;
cout<<“‘\nBase value = “<<b<<“Height = “<<h<<“Triangle Area = “<<area;
return 0;
}
OutPut
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 26
C++ PROGRAM 2:
(Area of triangle when three sides are known)
#inciude
#include using namespace std;
int main()
{
float a,b,c,area,s;
cout<<“\nEnter three sides of triangle cin>>a>>b>>c;
//Area of triangle when three sides are known
s = (a+b+c)/2;
area = sqrt(s*(s-a)*(s-b)*(s-c));
cout<<“\n Sidel value = “<<a<<“Side2
value = “<<b<<” Side3 value =”<<c;
cout<<“\nTriangie Area = “<<area;
return 0;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 27
c. To convert the temperature from Celsius to Fahrenheit.
C++ PROGRAM:
//Convertion of the temperature from Celsius to Fahrenheit
#include< iostream>
using namespace std;
int main()
{
float c,f;
cout<<”\nEnter Celsius value “; cin>>c;
f=9*c/5+32;
cout«”\nTemperature in Celsius = “<<C;
cout < <“\nTemperature in Fahrenheit =
“<<f;
return 0;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 28

Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++

Question 3.
Write a C++ to find the total and percentage of marks you secured from 10th Standard Public Exam. Display all the marks one-by- one along with total and percentage. Apply formatting functions.
C++ PROGRAM:
#include
#include
using namespace std;
int rnain()
{
int tarn,enm,mam,som,scm,total,avg; char name[30];
cout<<“\nEnter name of the student cin>>name;
cout<<“\nEnterTamil mark”; cin>>tam;
cout<<“\nEnter English mark”; cin>>enm;
cout<<“\nEnter Maths mark “; cin>>mam;
cout<<“\nEnter Science mark “; cin>>scm;
cout<<“\nEnter Social Science mark”; cin>>som; .
total = tarn + enm + mam + scm + som; avg = total / 5;
cout<<“\n\t\tlOth Standard Public Exam Mark”<<end!<<endl;
cout<<setw(30)<<“Name of the student «name<<endk<endl;
cout<<setw(30)<<setfill(“)<<“Tamil mark
< <setw(3)< <setfill(‘0’)< <tam< cout<<setw(30)<<setfillC ‘)<<“English
mark “<setw(3)<<setfill(‘0’)<<enm< cout<<setw(30)<<setfillC ‘)<<“Maths mark
< <setw(3)< <setfillCO’)< <mam< <endl< <endl;
cout<<setw(30)<<setfillC ‘)<<“Science
mark :”<<setw(3)<<setfill(‘0’)<<scm< cout< < setw(3G) < < setfi 11C ‘) < < “Soda I
Science mark :”<<setw(3)<<setfillC0’)< cout<<setw(30)<<setfillC ‘)«’Total Marks <<setw(3)<<setfillC0’)<<totak<endk<endl;
cout<<setw(30)«setfillC ‘)«”Average mark:”
<<setw(3)<<setfill(‘0’)< return 0;
}
Output
Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++ 29

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Tamilnadu State Board New Syllabus Samacheer Kalvi 12th Computer Applications Guide Pdf Chapter 12 DNS (Domain Name System) Text Book Back Questions and Answers, Notes.

Tamilnadu Samacheer Kalvi 12th Computer Applications Solutions Chapter 12 DNS (Domain Name System)

12th Computer Applications Guide DNS (Domain Name System) Text Book Questions and Answers

Part I

Choose The Correct Answers
Question 1.
Which of the following is used to maintain all the directory of domain names?
a) Domain name system
b) Domain name space
c) Name space
d) IP address
Answer:
a) Domain name system

Question 2.
Which of the following notation is used to denote IPv4 addresses?
a) Binary
b) Dotted-decimal
c) Hexadecimal
d) a and b
Answer:
d) a and b

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 3.
How many bits are used in the IPv addresses?
a) 32
b) 64
c) 128
d) 16
Answer:
c) 128

Question 4.
Expansion of URL is
a) Uniform Resource Location
b) Universal Resource Location
c) Uniform Resource Locator
d) Universal Resource Locator
Answer:
c) Uniform Resource Locator

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 5.
How many types are available in Relative URL?
a) 2
b) 3
c) 4
d) 5
Answer:
a) 2

Question 6.
Maximum characters used in the label of a node?
a) 255
b) 128
c) 63
d) 32
Answer:
c) 63

Question 7.
In domain name, sequence of labels are separated by
a) ;
b) .(dot)
c) :
d) NULL
Answer:
b) .(dot)

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 8.
Pick the odd one out from the following.
a) node
b) label
c) domain
d) server
Answer:
d) server

Question 9.
Which of the following initiates the mapping of the domain name to IP address?
a) Zone
b) Domain
c) Resolver
d) Name servers
Answer:
b) Domain

Question 10.
Which is the contiguous area up to which the server has access?
a) Zone
b) Domain
c) Resolver
d) Name servers
Answer:
a) Zone

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 11.
ISP stands for
a) International Service provider
b) Internet Service Provider
c) Internet service Protocol
d) Index service provider
Answer:
b) Internet Service Provider

Question 12.
TLD stands for
a) Top Level Data
b) Top Logical Domain
c) Term Level Data
d) Top Level Domain
Answer:
d) Top Level Domain

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 13.
Which of the following statements are true?
i) Domains name is a part of URL.
ii) URL made up of four parts
iii) The relative URL is a part of the Absolute URL
iv) URL doesn’t contain any protocol
a) i & ii
b) ii
c) i, ii & iii
d) i, ii & iv
Answer:
b) ii

Question 14.
Assertion (A): The number of addresses used in the IPv6 addressing method is 128.
Reason (R): IPv6 address is a 128-bit unique address.
a) A is true and R is false.
b) A is false and R is true.
c) Both A and R are correct and R is the correct explanation of A.
d) Both A and R are correct and R is not the correct explanation of A.
Answer:
b) A is false and R is true.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 15.
Match the following
a. domain – 1. The progress that initiates translation
b. zone – 2. contains a database of domain names
c. name server 3. single node
d. resolver 4. contiguous nodes
a. 1432
b. 3421
c. 3214
d. 3412
Answer:
a. 1432

Part II

Short Answers

Question 1.
List any four domain names.
Answer:
Domain Name:

  1. com
  2. edu
  3. gov
  4. mil

Meaning:

  1. Commercial Organisation
  2. Educational Institution
  3. Government (US)
  4. Military groups

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 2.
What is an IP address?
Answer:

  • Internet Protocol (IP) address is simply the logical address in the network layer.
  • Like how the door number/flat number is used to 10. differentiate individual house from others in the same apartment
  • IP address is also used to find the host system in the whole network.

Question 3.
What are the types of IP address?
Answer:

  1. IPv4 Address
  2. IPv6 Address

Question 4.
What is an URL?
Answer:

  • URL (Uniform Resource Locator) is the address of a document on the Internet.
  • URL is made up four parts-protocols, hostname, folder name and file name.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 5.
List out four URLs you know.
Answer:
URL:

  1. http: //www. example.com/index, html
  2. http://www.computer.com
  3. http://www.ibm.com
  4. https://www.hellotravel.com

Question 6.
What are the types of URLs?
Answer:
Depending on the location of the document the URL is divided into 2 types

    1. Absolute URL
    2. Relative URL

Question 7.
What is a domain?
Answer:

  • A domain is a single node of the Domain Namespace.
  • In the domain name space (DNS) tree structure domain is a sub structure tree. The domain can be further divided into sub domains.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 8.
What is a zone?
Answer:

  • Zone is the contiguous part up to which the server has access.
  • The domain assigned for the server does not divide into further subdomains the zone is the same as the domain.

Question 9.
What is a resolver?
Answer:

  • Resolver is a program which is responsible for initiating the translation of a domain name into an IP address.
  • A host system need to map domain name to IP address or vice versa according to the call and that work is done by resolver.

Question 10.
What are the categories available in domain name space?
Answer:
There are 3 important components in the Domain Name System. They are Namespace, Name server and Zone.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 11.
Write any four generic Top-Level Domain.
Answer:

Domain Name Meaning
com Commercial Organisation
edu Education Institutions
gov Government (US)
mil Military groups

Part III

Explain In Brief Answer

Question 1.
Write a note on DNS.
Answer:

  • Domain name space was designed to achieve a hierarchical namespace.
  • In this, the names are represented as a tree-like structure with a root element on the top and this tree can have a maximum of 128 levels starting from the root element taking the level 0 to level 127.

Question 2.
Differentiate IPv4 and IPv6.
Answer:

IPv4

IPv6

It has a 32-bit address length It has a 128-bit address length
It Supports Manual and DHCP address configuration It supports Auto and renumbering address configuration
In IPv4 end to end, connection integrity is Unachievable In IPv6, end to end connection integrity is Achievable
It can generate 4.29×109 address space Address space of IPv6 is quite large it can produce 3.4×1038 address space

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 3.
Differentiate Domain name and URL
Answer:

URL

DOMAIN NAME

URL is a full web address used to locate a webpage. A domain name is the translated and simpler form of a computer’s IP address (Logical address).
Complete web address containing domain name also. Part of the URL defines an organization or entity.
The method, hostname (domain name), port, and path. Based on subdomains (top-level, intermediate level, low level)

Question 4.
What are the differences between Absolute URL and Relative URL?
Answer:

Absolute URL

Relative URL

Absolute URL is the complete address of a document on the Inter­net. Relative URL is the par­tial address of a docu­ment on the Internet.
Absolute URL contains all the information that are required to find the files on the Internet. Relative URL contains only file name or file name with folder name.
If any of the four parts is missing then the browser would not able to link to the specific file We can use this type of URL when the file is on the same server related to the original document.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 5.
Write a note on the domain name.
Answer:

  1. Domain name is the sequence of labels. In domain name the sequence of labels are separated ‘ by dot (.).
  2. The domain name is always read from the lower level to higher level i.e., from the leaf node to root node.
  3. Since the root node always represents NULL string, all the domain name ending with dot.

Question 6.
Differentiate web address and URL
Answer:

WEB ADDRESS

URL

A Web Address more commonly defines a unique name that helps people remember a URL. A URL is the address of a particular website, an audio stream, or document available on the Web.
It is like a memorable street address, can help people find you online. It is the Internet address of a particu­lar site or document available via the World Wide Web.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Part IV

Explain In Detail

Question 1.
Explain briefly the components of DNS.
Answer:

DNS Components:
There are three important components in the Domain Name System. They are:

  1. Namespace
  2. Name server
  3. Zone

1. Name Space:

  • The domain names must be very unique and appropriate. The names should be selected from a namespace.
  • The name space can be organized in two ways
  • Flat name space
  • Hierarchical name space
  • Flat name space is where the name is assigned to the IP address. They do not have any specific structure.
  • Hierarchical name space is where the name is made up of several parts. The first part may represent the nature of organization, the second part may represent the name of organization, and third part may represent the department of the organization.
  • Domain name space was designed to achieve hierarchical name space.

2. Name Servers:

  • The information which needs to be stored in Domain name space is quite large. Single system would be inefficient to store such a huge amount as responding to requests from all over the world. It also becomes unreliable because in case of any failure the data becomes inaccessible.
  • Name Server is a main part in the Domain Name System (DNS). It trAnswer:late the domain names to IP addresses.
  • Name server contains the DNS database which consists of domain names and their corresponding IP addresses.
  • There is a need to store large number of domain names for the world wide usage, so plenty of servers are used in the hierarchical manner.
  • Name servers do the important task of searching the domain names. While you searching a website, Local Name server (provided by ISP) asks the different name servers until one of them find out your Answer. At last, it returns IP address for that domain name.

3. Zone:

  • The entire namespace is divided into many different zones. It is the area up to which the server has access.
  • Zone is defined as a group of contiguous domains and sub-domains. If the zone has a single domain, then the zone and domain are the same.
  • Every zone has a server which contains a database called a zone file. Using the zone file, the DNS server replies the queries about hosts in its zone. There are two copies of zone files available, Master file and slave file.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 2.
Classify and Explain the IP address.
Answer:

  • Internet Protocol (IP) address is simply the logical address in the network layer.
  • Like how the door number/flat number is used to differentiate an individual house from others in the same apartment.
  • An IP address is also used to find the host system in the whole network.
  • Due to increase in the number of system in a network, there is a need of more addresses which lead to two addressing methods i.e., IPv4 and IPv6.

IPv4 Address

  • It IPv4 address is a 32-bit unique address given to a computer system.
  • No two systems can have same IP address.
  • If the network has p connections then ‘ip’ addresses should be there.
  • An address space is the total number of address¬es that can be made by that protocol.
  • It is determined by the number of bits that the protocol used.
  • If the protocol uses ‘n’ bits then the address space of that protocol would be ‘2n’ addresses can be formed. So, the number of addresses that can be formed in IPv4 is 232,
  • There are two ways to represent the IP address
    • Binary notation
    • Dotted-decimal notation
  • In binary notation the address is expressed as 32-bit binary values.
    • For E.g. 00111001 10001001 111000 00000111
  • In dotted-decimal notation the address is written in decimal format separated by dots(.). For e.g. 128.143.137.144

IPv6 Address

  • IPv6 address is a 128-bit unique address given to a computer system.
  • The number of addresses that can be formed in IPv6 is 2128. In IPv6 address, the 128 bits are divided into eight 16-bits blocks.
  • Each block is then changed into 4-dig¬it Hexadecimal numbers separated by colon symbols.
  • E.g. 2001:0000:32313:DFE1:0063:0000:0000:F EFB.a

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 3.
Explain about the name server?
Answer:
Name Servers:
1. The information which needs to be stored in the Domain namespace is quite large. A single system would be inefficient and insufficient to store such a huge amount as responding to requests from all over the world. It also becomes unreliable because in case of any failure the data becomes inaccessible.

2. The solution to this problem is to distribute the information among many computers. The best way to do that is to divide the entire space into many domains and subdomains

3. DNS also allows domains to be further divided into subdomains. By this, the solution to the problem is obtained and the hierarchy of servers is also maintained.

4. Name servers store the data and provide it to clients when queried by them. Name Servers are programs that run on a physical system and store all the zone data.

5. Name Server is a main part in the Domain Name System (DNS). It translates the domain names to IP addresses.

6. Name server contains the DNS database which consists of domain names and their corresponding IP addresses.

7. There is a need to store large number of domain names for worldwide usage, so plenty of servers are used in a hierarchical manner.

8. Name servers do the important task of searching the domain names. While you searching a website, the Local Name server (provided by ISP) ask the different name servers until one of them find out your Answer. At last it returns IP address for that domain name.

Types of Name Servers
There are three types of Name Servers which control the entire Domain Name System:
(i) Root Name Server – top-level server which contains entire DNS tree, maintained by ICANN.
There are 13 servers.

(ii) Primary/Master Name Server – contains a zone resource records. These records are updatable by domain name holders such as organizations.

(iii) Secondary/Slave Name Server – contains a copy of primary server files. This server has no authority to update, but reduce the workload of master server by sharing the queries.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 4.
What is domain name space? Explain.
Answer:

  • Domain name space was designed to achieve hierarchical name space.
  • In this, the names are represented as a tree like structure with root element on the top and this tree can have a maximum of 128 levels starting from root element taking the level 0 to level 127.
  • The domain namespace where the root element is present at the top most level i.e., level 0.
  • The root element always represents the NULL string (empty string).
  • The next level to the root element is node (children of root element). Each node in the tree has a label and a domain name.

Label:

  • It is a string which can have maximum of 63 characters.
  • Each node in that level should have different labels thereby assuring the individuality of the domain name.
  • In other words, Labels are the names given to domains.
  • Domain is a sub tree in domain name space tree structure. The domain can be further divided into sub domains.

Domain name

  • It is the sequence of labels. In domain name the sequence of labels are separated by dot (.).
  • The domain name is always read from the lower level to higher level i.e., from the leaf node to root node.
  • Since the root node always represent NULL string, all the domain name ending with dot.

Basic rules of Domain names

  • Domain can consists of Alphabets a through z, and the digits 0 through 9.
  • Hyphens are allowed, but hyphens cannot be used as first character of a domain name.
  • Spaces are not alloweds
  • Special symbols (such as !, $, &,. not permitted.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 5.
Explain how the DNS is working.
Answer:

  1. When the user enters the URL (consists of a protocol, domain name, folder name, filename) in the browser, the system fist checks its DNS cache for the corresponding IP address.
  2. If the IP address is found in the cache then the information is retrieved from the cache.
  3. If not, then the system needs to perform a DNS query i.e., the system needs to query the resolver about the IP address from Internet Service Provider (ISP).
  4. Each resolver has its own cache and if it is found in that then that information is retrieved.
  5. If not, then the query is passed to the next domain server i.e., TLD (Top Level Domain) which reviews the request and directs the query to name servers associated with that specific domain.
  6. Until the query is solved it is passed to next level domains. At last, the mapping and the record are returned to the resolver who checks whether the returned value is a record or an error.
  7. Then the resolver returns the record back to the computer browser which is then viewed by the user.

12th Computer Applications Guide DNS (Domain Name System) Additional Important Questions and Answers

Part A

Choose The Correct Answers:

Question 1.
Expand DNS?
(a) Direct Name Server
(b) Domain Name System
(c) Domain Name Security
(d) Direct Name Service
Answer:
(b) Domain Name System

Question 2.
For the communication to takes place, the information should pass through …………… layers
a) six
b) two
c) end to end
d) Seven
Answer:
d) IP addresses

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 3.
While typing a web address, DNS translates it into a machine-friendly IP address.
(a) True
(b) False
Answer:
(a) True

Question 4.
DNS provides the domain name to IP address mapping through ………….
a) IP address
b) Name Servers
c) domain
d) URL
Answer:
b) Name Servers

Question 5.
Paul V. Mockapetris together with ………………. invented the Internet Domain Name System (DNS).
a) Jon Postel
b) Dennis Ritchie
c) James Gostling
d) Carrelli
Answer:
a) Jon Postel

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 6.
IP stands for …………………
(a) Input process
(b) Input
(c) Internet Protocol
(d) Internet Power
Answer:
(c) Internet Protocol

Question 7.
……………….. is available below the root domain.
a) IANA
b) IPv4
c) IPv6
d) TLD
Answer:
d) TLD

Question 8.
How many IP addressing methods are there?
(a) 1
(b) 2
(c) 3
(d) 4
Answer:
(b) 2

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 9.
…………. is a program running on a dedicated machine which handles the queries of www end-user.
a) Webserver
b) Web Host
c) DNS
d) HTML
Answer:
a) Webserver

Question 10.
If the protocol uses ‘n’ bits then the address space of that protocol would be …………………….
(a) n
(b) n2
(c) 2n
(d) 2n
Answer:
(d) 2n

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Fill in The Blanks.

1. …………… is a logical address used to uniquely identify a computer over the Network.
Answer:
IP address

2. IPv4 address is a …………… unique address given to a computer or a device.
Answer:
32 bit

3. IPv6 address is a ……………. unique address given to a computer or a device.
Answer:
128 bit

4. …………… follows Hexadecimal number notation.
Answer:
IPv6

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

5. ……………. is the address of a document on the Internet.
Answer:
URL (Uniform Resource Locator)

6. ……………… contains only folder name and the file name or just the file name.
Answer:
Relative URL

7. …………….. is a tree-like structure with a root element on the top.
Answer:
Domain namespace.

8. The domain name is always read from the …………….
Answer:
leaf node to root node.

9. In the domain name space (DNS) tree structure …………… is a substructure tree.
Answer:
domain

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

10. …………. are programs that run on a physical system and store all the zone data.
Ans :
Name Servers

11. ……………….. provides to clients when queried by them.
Answer:
Name Servers

12. ……………. non-profit organization which regulates the Internet.
Answer:
ICANN

13. ………….. is an affiliated authority of ICANN.
Answer:
IANA (Internet Assigned Numbers Authority)

14. ……………… is a group of contiguous domains and subdomains in the Domain Name Space.
Answer:
Zone

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Assertion And Reason

Question 1.
Assertion (A): Domain Name System (DNS) maintains all the directory of domain names and helps us to access the websites using the domain names.
Reason(R): t translates the domain name into an IP address.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
c) (A) is true and (R) is false

Question 2.
Assertion (A): IPv4 address is a 64-bit unique address.
Reason(R): There are two ways to represent the IP address: Binary notation, Dotted-decimal notation.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
d) (A) is false and (R) is true

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 3.
Assertion (A): Label is a string
Reason(R): Label can have a maximum of 63 characters
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)

Question 4.
Assertion (A): Domain namespace is a tree-like structure with a root element on the top
Reason(R); it can have a maximum of 127 levels starting from the root element
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
c) (A) is true and (R) is false

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 5.
Assertion (A): The Resolver is a service of ICANN
Reason(R): Resolver, a client/ server application, initiates the process of resolving the domain names.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
d) (A) is false and (R) is true

Question 6.
Assertion (A): URL Stands for Uniform Resource Locator
Reason(R): URL- the address of a specific web page or file on the Internet.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)

Question 7.
Assertion (A): A web server is a program running on a dedicated machine which handles the queries of the www end user.
Reason(R): A web server is a type of Web Host.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
c) (A) is true and (R) is false

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Find The Odd One On The Following

1. (a) File Name
(b) Protocol
(c) HTML
(d) Host Name
Answer:
(c) HTML

2. (a) Label
(b) Namespace
(c) Name server
(d) Zone
Answer:
(a) Label

3. (a) Flat Namespace
(b) Domain Namespace
(c) Host Namespace
(d) Hierarchical Namespace
Answer:
(c) Host Namespace

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

4. (a) Tree Like Structure
(b) 128 Levels
(c) NULL string
(d) Flat Namespace
Answer:
(d) Flat Namespace

5. (a) .com
(b) -ta
(c) .gov
(d) .nic
Answer:
(b) -ta

6. (a) com
(b) net
(c) bd
(d) info
Answer:
(c) bd

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

7. (a) India
(b) Malaysia
(c) Singapore
(d) Srilanka
Answer:
(b) Malaysia

8. (a) Name server
(b) DNS Database
(c) IP Address
(d) HTTP
Answer:
(d) HTTP

9. (a) Primary Name Server
(b) Secondary Name Server
(c) Node Name Server
(d) Root Name Server
Answer:
(c) Node Name Server

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

10. (a) Host
(b) Webserver
(c) DNS server
(d) Namespace
Answer:
(d) Namespace

11. (a) Name server
(b) Resolver
(c) ICANN
(d) Zone
Answer:
(c) ICANN

12. (a) 32 bit
(b) Binary Notation
(c) Hexadecimal
(d) Dotted decimal
Answer:
(c) Hexadecimal

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

13. (a) WHOIS
(b) ICANN
(c) IAN
(d) FORTRAN
Answer:
(d) FORTRAN

14. (a) 128bit
(b) 16block
(c) Hexadecimal
(d) Binary notation
Answer:
(d) Binary notation

15. (a) in
(b) cn
(c) gov
(d) pk
Answer:
(c) gov

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Very Short Answers

Question 1.
What is a domain?
Answer:
A domain is a single node of the Domain Namespace.

Question 2.
What is Zone?
Answer:
A zone is a subset of the Domain namespace generally stored in a file.

Question 3.
What is Domain Name Space?
Answer:
Domain Namespace is an entire collection of Domains, Subdomains, and Zones.

Question 4.
What is a Name Server?
Answer:
Name server manages the database of domain names and corresponding IP addresses.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 5.
What does the zone contain?
Answer:
A zone can contain more than one subdomain.

Question 6.
What does the server contain?
Answer:
A server can contain more than one zone file (Zones).

Domain Name Meaning

DOMAIN

MEANING

com Commercial Organisation
edu Educational Institutions
gov Government (US)
mil Military groups
org Nonprofit Organization
net Networking organization
info Information service providers

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Part B

Short Answers

Question 1.
Name the four parts of the URL?
Answer:
URL is made up of four parts-protocols, hostname, folder name, and file name. Each part has its own specific functions. Depending on the applications, additional information can be added to the URL but the common and fundamental URL consists of these four parts.

Question 2.
List the three components of DNS?
Answer:

  1. NameSpace
  2. Name server
  3. Zone

Question 3.
What is a Label?
Answer:

  • The label is a string which can have a maximum of 63 characters.
  • Each node in that level should have different labels thereby assuring the individuality of the domain name.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 4.
Name the three domain names used in Tamil language?
Answer:
India,
Singapore,
Srilanka.

Question 5.
What is the Inverse domain?
Answer:
Inverse domain performs the opposite task of the normal DNS query. It converts the IP address to the domain name.

Question 6.
What is Zone File?
Answer:
Every zone has a server which contains a database called a zone file.

Question 7.
What are the two copies of the zone file?
Answer:
There are two copies of zone files available, they are

  1. Masterfile
  2. Slave file.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 7.
Write the demerits of the Flat namespace?
Answer:
The major disadvantage of flat namespaces is that they cannot be used in large systems. Because they need to be accessed and controlled centrally to avoid ambiguity and redundancy.

Part C

Explain In Brief Answer

Question 1.
What are the fundamentals of URL?
Answer:

  • URL is made up of four parts-protocols, hostname, folder name, and file name.
  • Each part has its own specific functions. Depending on the applications, additional information can be added to the URL but the common and fundamental URL consists of these four parts.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System) 1

    • Protocol
    • Domain name/Hostname
    • Folders
    • Filename with extension

Question 2.
What is meant by Label?
Answer:
Label:
It is a string which can have a maximum of 63 characters. Each node in that level should have different labels thereby assuring the individuality of the domain name. In other words, Labels are the names given to domains. The domain is a subtree in the domain name space tree structure. The domain can be further divided into subdomains.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Question 3.
Write a note on Country top-level domain names.
Answer:

  • Country domain uses 2-character country abbreviation according to country.
  • For e.g., google.in – for INDIA, Google’s for US.Some of the Domain Name and their meaning listed below.
    table

Question 4.
Explain the types of Name servers?
Answer:
Types of Name Servers:
There are three types of Name Servers which control the entire Domain Name System:
Root Name Server – top-level server which contains the entire DNS tree, maintained by ICANN. There are 13 servers.

Primary/Master Name Server- contains zone resource records. These records are updatable by domain name holders such as organizations.

Secondary/Slave Name Server – contains a copy of primary server files. This server has no authority to update but reduces the workload of the master server by sharing the queries.

Samacheer Kalvi 12th Computer Applications Guide Chapter 12 DNS (Domain Name System)

Part IV

Explain In Detail

Question 1.
Explain the Basic rules of Domain names?
Answer:
Basic rules of Domain names:

  1. A domain can consist of Alphabets a through z, and the digits 0 through 9.
  2. Hyphens are allowed, but hyphens can not be used as the first character of a domain name.
  3. Spaces are not allowed.
  4. Special symbols (such as ! $, &, _ and so on) are not permitted, length of 2, and the maximum length of 63 characters.
  5. The entire name may be at most 253 characters long.
  6. Domain names are not case-sensitive.(It may be upper, lower, or mixing of both case letters)

Question 2.
Write a note on the Hierarchical namespace?
Answer:

  • To avoid the major disadvantage of the Flat namespace, the hierarchical namespace is used in large.
  • A hierarchical namespace is where the name is made up of several parts.
    • The first part may represent the nature of the organization,
    • The second part may represent the name of the organization, and
    • Third-party may represent the department of the organization and so on.
  • In this way, the power to control the namespace can be decentralized.
  • The centralized authority can be given to nature and then the name of the organization and so on.
  • To achieve a hierarchical namespace, Domain Name Space was designed.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Tamilnadu State Board New Syllabus Samacheer Kalvi 12th Computer Applications Guide Pdf Chapter 13 Network Cabling Text Book Back Questions and Answers, Notes.

Tamilnadu Samacheer Kalvi 12th Computer Applications Solutions Chapter 13 Network Cabling

12th Computer Applications Guide Network Cabling Text Book Questions and Answers

Part I

Choose The Correct Answers

Question 1.
ARPANET stands for
a) American Research Project Agency Network
b) Advanced Research Project Area Network
c) Advanced Research Project Agency Network
d) American Research Programs And Network
Answer:
c) Advanced Research Project Agency Network

Question 2.
WWW was invented by
a) Tim Berners Lee
b) Charles Babbage
c) Blaise Pascal
d) John Napier
Answer:
a) Tim Berners Lee

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 3.
Which cable is used in cable TV to connect with setup box?
a) UTP cable
b) Fibre optics
c) Coaxial cable
d) USB cable
Answer:
c) Coaxial cable

Question 4.
Expansion of UTP is
a) Uninterrupted Twisted Pair
b) Uninterrupted Twisted Protocol
c) Unshielded Twisted Pair
d) Universal Twisted Protocol
Answer:
c) Unshielded Twisted Pair

Question 5.
Which medium is used in the optical fibre cables to transmit data?
a) Microwave
b) infra red
c) light
d) sound
Answer:
c) light

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 6.
Which of the following is a small peripheral device with a sim slot to connect the computers to Internet?
a) USB
b) Dongles
c) Memory card
d) Mobiles
Answer:
a) USB

Question 7.
Which connector is used in the Ethernet cables?
a) RJ11
b) RJ21
c) RJ61
d) RJ45
Answer:
d) RJ45

Question 8.
Which of the following connector is called as champ connector?
a) RJ11
b) RJ21
c) RJ61
d) RJ45
Answer:
b) RJ21

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 9.
How many pins are used in RJ45 cables?
a) 8
b) 6
c) 50
d) 25
Answer:
a) 8

Question 10.
Which wiring standard is used for connecting two computers directly?
a) straight Through wiring
b) Cross Over wiring
c) Rollover wiring
d) None
Answer:
b) Cross Over wiring

Question 11.
Pick the odd one out from the following cables
a) roll over
b) cross over
c) null modem
d) straight through
Answer:
c) null modem

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 12.
Match the following
1. Ethernet – Port
2. RJ45 connector – Ethernet
3. RJ45 jack – Plug
4. RJ45 cable – 802.3
a) 1, 2, 4, 3
b) 4, 1, 3, 2
c) 4, 3, 1, 2
d) 4, 2, 1, 3
Answer:
d) 4, 2, 1, 3

Part II

Short Answers

Question 1.
Write a note on twisted pair cable?
Answer:

  • Twisted Pair Cables is a type of cable with two or more insulated wires twisted together.
  • It started with the speed of 10 Mbps (10BASE-T cable is used).
  • It started with the speed of 10 Mbps (10BA.SE-T cable is used).
  • Then the cable is improved and the speed was higher and went to 100 Mbps and the cable was renamed 100BASE-TX.

Question 2.
What are the uses of USB cables?
Answer:

  • The Universal Serial Bus is used to connect the keyboard, mouse, and other peripheral devices.
  • Micro USB is a miniaturized version of the USB used for connecting mobile devices such as smartphones, GPS devices, and digital cameras.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 3.
Write a note on the types of RJ45 connectors?
Answer:

  1. Wiring schemes specify how the wires to be connected with the RJ45 connector.
  2. There are two wiring schemes available to terminate the twisted-pair cable on each end, which are
    • T-568A
    • T-568B.

Question 4.
What is an Ethernet port?
Answer:

  • The Ethernet port is the jack where the Ethernet cable is to be connected.
  • This port will be there In both the computers and the LAN port.

Question 5.
What is the use of the Crimping tool?
Answer:
A crimping tool is a physical tool which is used to connect the patch wire and the Ethernet connector. The tool will puncture the connector and makes the wire set in the connector.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 6.
What are the types of twisted pair cables?
Answer:
There are two types of twisted pair cables, Unshielded Twisted Pair (UTP) and Shielded Twisted pair (STP). The UTP is used nowadays as modem cables for the Internet and they are lower in cost and installation and maintenance is easy compared to the coaxial cables.

Question 7.
What is meant by champ connector?
Answer:
The RJ-21 connector has 50 pins with 25 pins at one end and 25 pins at the other end. It is also called a champ connector or Amphenol connector. The Amphenol is a connector manufacturer. The RJ-21 interface is typically used for data communication trucking applications.

Part III

Explain In Brief Answer

Question 1.
Write a note on crossover cables.
Answer:

  • If you require a cable to connect two computers or Ethernet devices directly together without a hub, then you will need to use a Crossover cable instead.
  • The easiest way to make a crossover cable is to make one end to T568A colour coding and the other end to T568B.
  • Another way to make the cable is to remember the colour coding used in this type. Here Green set of wires at one end are connected with the Orange set of wires at another end and vice versa.

Question 2.
Write a short note on RJ45 connector?
Answer:
RJ45 Connector:

  1. The RJ45 connector is a small plastic cup which will be used to connect the wire inside the connector and ready to connect to the Internet.
  2. The RJ45 connector looks similar to a telephone jack but it looks slightly wider. The Ethernet cables are sometimes called RJ45 cables.
  3. In RJ45 the “RJ” stands for the Registered Jack and the “45” simply refers to the number of interface standards in the cable.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 3.
What are the differences between serial and parallel ports?
Answer:

Subject

Serial Port

parallel port

Pins 9 pins 25 pins
Type of port Male port Female Port
Color Usually Purple in color Usually Green in color
Data Transfer Rate Slower than Parallel Port Faster than Serial Port
Moving Bits Serial move bits inline, one at a time. Parallel moves bits next to each other
Usage of Wire Serial ports are only used 2 wires for transmitting and receiving data Parallel Port used 8 or more wire for trans­mitting and receiving data.

Question 4.
What is meant by a null modem cable?
Answer:
RS-232 cable is also used for interconnecting two computers without a modem. So it is also a null-modem cable. A cable interconnecting two devices directly are known as a null-modem cable.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 5.
What are the components involved in Ethernet cabling?
Answer:
The three main components are used in the Ethernet cabling components are

  1. Patch Cable (Twisted pair)
  2. RJ45 Connector
  3. Ethernet Ports
  4. Crimping Tool

Question 6.
What are the types of Fibre optic cables?
Answer:
There are two types of fiber optic cables available.

  1. One is single-mode (100BaseBx)
  2. Multimode (lOOBaseSX).
    • Single-mode cables are used for long-distance transmission and at a high cost
    • Multimode cables are used for short-distance transmission at a very low cost.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Part IV

Explain In Detail

Question 1.
What is meant by Registered Jack? Explain briefly the types of Jacks.
Answer:
Registered Jacks:

  • A Registered Jack commonly known as RJ is a network interface used for network cabling, wiring, and jack construction.
  • The primary function of the registered jack is to connect different data equipment and telecommunication devices.
  • The commonly known registered jacks are RJ-11, RJ-45, RJ-21, and RJ-28.
  • The registered jack refers to the male physical connector (Plug), a female physical connector (Jack) and it’s the wiring.

RJ-11:

  • It is the most popular modern form of the registered jack.
  • It is found in the home and office.
  • This registered jack is mainly used in telephone and landlines.
  • There are 6 pins where
    • The two pins give the transmission configuration,
    • The two pins give the receiver configuration and
    • The other two pins will be kept for reserved.
    • The two pin will have the positive terminal and the negative terminal.

RJ-14 and RJ-61:

  • The RJ-14 is the same as RJ-11 which will be used for telephone lines where same it as 6 pins whereas the RJ-61 will have 8 pins.
  • This RJ-61 will use the twisted pair cable with a modular connection.

RJ-21:

  • The RJ-21 connector has 50 pins with 25 pins at one end and 25 pins at the other end.
  • It is also called as champ connector or Amphenol connector.
  • The Amphenol is a connector manufacturer.
  • The RJ-21 interface is typically used for data communication trucking applications.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 2.
Explain wiring techniques used in Ethernet cabling.
Answer:

  • There are three types of wiring techniques to construct the Ethernet cable.
  • It is also known as color coding techniques. They are
    • Straight-Through Wiring
    • Cross-over Wiring
    • Roll-over Wiring

Straight-Through Wiring

  • In general, the Ethernet cables used for Ethernet connections are “straight through cables”.
  • These cable wires are in the same sequence at both ends of the cable, which means that pin 1 of the plug on one end is connected to pin 1 of the plug on the other end (for both standard – T568A & T568B).
  • The straight through wiring cables are mostly used for connecting PC / NIC card to a hub.
  • This is a simple physical connection used in printers, computers and other network interfaces.

Cross-over Wiring

  • Crossover cable is used to to connect two com¬puters or Ethernet devices directly together without a hub.
  • The pairs(Tx and Rx lines) will be crossed which means pin 1 & 2 of the plug on one end are connected with pin 3 & 6 of the plug on other end, and vice versa (3 & 6 to pin 1 & 2).
  • The Null modem Cables are the example of the crossover cables.

Roll-over Wiring

  • Rollover cable is a type of null-modem cable that is often used to connect a device console port to make programming changes to the device.
  • The rollover wiring have opposite pin arrangements, all the cables are rolled over to different arrangements.
  • In the rollover cable, the colored wires are reversed on other end i.e. the pins on one end are connected with other end in reverse order.
  • Rollover cable is also known as Yost cable or Console cable. It is typically flat (and light blue color) to distinguish it from other types of network cabling.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 3.
Explain about RJ45 connector.
Answer:

  • The RJ45 connector is a small plastic cup which will be used to connect the wire inside the connector and ready to connect the Internet.
  • The RJ45 connector looks similar like a telephone jack but it looks a slightly wider.
  • The Ethernet cables are sometime called as RJ45 cables.
  • In RJ45 the “RJ” stands for the Registered Jack and the “45” simply refers to the number of interface standard in the cable.
  • Each RJ45 connector has eight pins and connected to each end of the Ethernet cable, since it has 8-position, 8-contact (8P8C) modular plug,
  • It is also known as 8P8C connector. These plugs (connector) are then inserted into Ethernet port of the network card.

Wiring schemes and color codes of the connector

  • The RJ45 connector has eight small jack inside to connect eight small wires of the patch cable.
  • The eight cables are in eight different colors. Let’s discuss that eight colors and where does that eight colors connect to the RJ45 connector.
  • Wiring schemes specifies how the wires to be connected with RJ45 connector. There are two wiring schemes available to terminate the twisted-pair cable on each end, which are T-568A and T-568B.
  • Although four pairs of wires are available in the cable, Ethernet uses only two pairs: Orange and Green. The other two colors (blue and brown) can be used ISDN or phone connections.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 4.
Explain the components used in Ethernet cabling.
Answer:

The main components are used in the Ethernet cabling are

  1. Patch Cable (Twisted pair)
  2. RJ45 Connector
  3. Ethernet Ports
  4. Crimping Tool

1. Patch Cable (Twisted Pair):
1. These Cables are generally made up of 8 wires in different colors.

2. Four of them are solid colours, and the others are striped.
3. The eight colors are white green, green, white orange, blue, white blue, orange, white brown and brown. The following figure 13.8 shows the patch cable.
Ethernet cables are normally manufactured in several industrial standards such as Cat 3, Cat 5, Cat 6, Cat 6e and cat 7. “Cat” simply stands for “Category,”. Increasing the size of the cable also lead to slower transmission speed.

4. The cables together with male connectors (RJ45) on each end are commonly referred as Ethernet cables. It is also called as RJ45 cables, since Ethernet cable uses RJ45 connectors.

2. RJ45 Connector:

  • The RJ45 connector is a small plastic cup which will be used to connect the wire inside the connector and ready to connect the Internet.
  • The RJ45 connector looks similar like a telephone jack but it looks a slightly wider.
  • The Ethernet cables are sometime called as RJ45 cables.
  • In RJ45 the “RJ” stands for the Registered Jack and the “45” simply refers to the number of interface standard in the cable.
  • Each RJ45 connector has eight pins and connected to each end of the Ethernet cable.
  • Since it has 8-position, 8-contact (8P8C) modular plug, It is also known as 8P8C connector. Th£se plugs (connector) are then inserted into Ethernet port of the network card.

3. Ethernet card and Port:

  • Ethernet card is a Network Interface Card (NIC) that allows computers to connect and transmit data to the devices on the network. It may be an expansion card or built-in type.
  • Expansion card is a separate circuit board also called as PCI Ethernet card which is inserted into PCI slot on motherboard of a computer.
  • Now a days most of the computers come with built-in Ethernet cards which resides on motherboard.
  • Wireless Ethernet cards are also available, which uses radio waves to transmit data.
  • Ethernet port is an opening which is a part of an Ethernet card. It accepts RJ45 connector with Ethernet cable. It is also called as RJ45 jack. It is found on personal computers, laptops, routers, switches, hubs and modems.
  • In these days, most of the computers and laptops have a built-in Ethernet port for connecting the device to a wired network.

4. Crimping Tool:

  • Crimping is the process of joining two or more pieces of metal or wire by deforming one or both of them to hold each other.
  • A crimping tool is a physical tool which is used to connect the patch wire and the Ethernet connector.
  • The tool will puncture the connector and makes the wire set in the connector.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 5.
Explain the type of Network cables?
Answer:
There are many types of cables available in networking. Here we discuss six different cables.
1. Coaxial Cables:

  • This cable is used to connect the television sets to home antennas and transfer the information in 10 Mbps,
  • It is divided into thinnet and thicknet cables.
  • These cables have a copper wire inside and insulation Is covered on the top of the copper wire to provide protection to the cable.
  • These cables are very difficult to install and maintain because they are too big to carry and replace.
  • The coaxial cable got its name by the word “coax”. Nowadays coaxial cables are also used for dish TV where the setup box and the television is connected using the coaxial cable only.
  • Some of the cable names are Media Bridge 50-feet Coaxial cable, Amazon basics CL2- Rated Coaxial cables, etc.

Twisted Pair Cables:

  • It is type of cable with two or more insulated wires twisted together.
  • It started with the speed of 10 Mbps (10BASE-T cable is used).
  • Then the cable is improved and the speed was higher and went to 100 Mbps and the cable was renamed 100BASE-TX.
  • Then finally the cable improved more made to 10 Gbps and named as 10GBASE-T.
  • This twisted cable has 8 wires which are twisted to ignore electromagnetic interference.
  • Also, the eight wires cannot be placed in a single unit there could be a difficulty in spacious, so it is twisted to make as one wire.
  • There are two types of twisted pair cables, Unshielded Twisted Pair (UTP) and Shielded Twisted pair (STP).
  • The UTP is used nowadays as modern cables for the Internet and they are lower in cost and installation and maintenance is easy compared to the coaxial cables.
  • STP is similar to UTP, but it is covered by an additional jacket to protect the wires from External interference.

Fiber Optics:

  • This cable is different from the other two cables.
  • The other two cables had an insulating material on the outside and the conducting material like copper inside.
  • But in this cable it is of strands of glass and pulse of light is used to send the information.
  • They are mainly used in Wide Area Network (WAN)/The WAN Is a network that extends to the very large distance to connect the computers,

Ethernet Cables:

  • Ethernet cable is the most common type of network cable mainly used for connecting the computers or devices at home or office.
  • This cable connects wired devices within the local area network (LAN) for sharing the resources and accessing the Internet.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

12th Computer Applications Guide Network Cabling Additional Important Questions and Answers

Part A

Choose The Correct Answers:

Question 1.
Which year were the co-axial cables invented?
(a) 1880
(b) 1890
(c) 1990
(d) 2000
Answer:
(a) 1880

Question 2.
The latest version of USB is ………………
a) 2.0
b) 4.0
c) 5.0
d) 3.0
Answer:
d) 3.0

Question 3.
Co-axial cables transfer the information in …………………………
(a) 10 kbps
(b) 10 Mbps
(c) 10 GBPS
(d) 10 TBPS
Answer:
(b) 10 Mbps

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 4.
……………….. cable connects wired devices within the local area network for sharing the resources and accessing the Internet.
a) wireless Cable
b) Ethernet cable
c) Coaxial Cable
d) Twisted Wire
Answer:
d) Twisted Wire

Question 5.
Co-axial cables are made up of ……………………..
(a) Steel
(b) Iron
(c) Copper
(d) Aluminium
Answer:
(c) Copper

Question 6.
………….. are used for connecting the television with the setup box.
a) UTP
b) STP
c) Twisted Cable
d) Coaxial cables
Answer:
d) Coaxial cables

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 7.
…………………….. is a type of cable with two or more insulated wires twisted together.
Answer:
Twisted pair cables

Question 8.
The ……………. uses light to transmit the information from one place to another.
a) Fibre cable
b) Network cable
c) optic cable
d) None of these
Answer:
c) optic cable

Question 9.
Assertion (A): 8 wires of the twisted cable are twisted
Reason (R): To ignore electromagnetic interference.
(a) A is true R is the reason
(b) A, R both false
(c) A is false R is true
(d) A is true, R is not the reason
Answer:
(a) A is true R is the reason

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 10.
…………….. are used for long-distance transmission and at a high cost.
a) optic cable
b) Network cable
c) Multimode cable
d) Single-mode cables
Answer:
b) Network cable

Question 11.
STP stands for ………………………
(a) Shielded Turn paper
(b) Shielded Twisted pair
(c) Soft Turn Photo
(d) Short Time processing
Answer:
(b) Shielded Twisted pair

Question 12.
The serial port will send ………….. at one time.
a) 2 bit
b) Null
c) 1 bit
d) 5 bit
Answer:
c) 1 bit

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 13.
Find the wrongly matched pair.
(a) coaxial cables – TV
(b) Twisted pair cables – ATP, UTP
(c) Fiber optic cables – Single-mode, Multimode
Answer:
(b) Twisted pair cables – ATP, UTP

Question 14.
The Null modem Cables are an example of the crossover cables.
a) coaxial
b) crossover cables
c) parallel cables
d) Serial cable
Answer:
b) crossover cables

Question 15.
The ……………. is the basic component of the Local Area Network(LAN)
a) parallel cables
b) Serial cable
c) coaxial
d) Ethernet cable
Answer:
d) Ethernet cable

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 16.
The two types of fiber optic cables are ……………………… and ………………………..
Answer:
Single-mode, Multi-mode

Fill In The Blanks

1. The …………… is a small plastic cup which will be used to connect the wire inside the connector and ready to use to connect the Internet.
Answer:
RJ45 Ethernet connector

2. The ………….. has eight small pins inside to connect eight small wires in the patch cable. The eight cables have eight different colours.
Answer:
RJ45 connector

3. The …………….. is the jack where the Ethernet cable is to be connected.
Answer:
Ethernet port

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

4. …………….. port will be there in both the computers and the LAN port.
Answer:
Ethernet port

5. The …………… is a physical tool which is used to connect the patch wire and the Ethernet connector(RJ45).
Answer:
crimping tool

6. A ……………. is a network interface used for connecting different data equipment and telecommunication devices.
Answer:
Registered Jack (RJ)

7. ……………… jack is mainly used in telephone and landlines.
Answer:
RJ11

8. ……………… cable is used to transfer the information in 10 Mbps.
Answer:
Coaxial

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Very Short Answers

Question 1.
What is the purpose of network cables?
Answer:
The Network cables are used to transfer the data and information to another computer.

Question 2.
What is the use of coaxial cable?
Answer:
Coaxial cables are used for connecting the television with the setup box.

Question 3.
How many wires are there in the twisted cable? Why?
Answer:
Twisted cable has 13 wires which are twisted to ignore electromagnetic interference

Question 4.
What are the two types of twisted pair cables?
Answer:
Unshielded Twisted Pair (UTP) and Shielded Twisted pair (STP).

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 5.
Expand ARPANET.
Answer:
Advanced Research Project Agency Network

Question 6.
What is ARPANET?
Answer:
It is the predecessor of the modern Internet.

Question 7.
What is the use of USB cables?
Answer:
USB cables are used to connect keyboard, mouse, and other peripheral devices

Question 8.
What is the use of parallel cables?
Answer:
The parallel cables are used to connect to the printer and other disk drivers.

Question 9.
What are the two types of fiber-optic cable?
Answer:
Single-mode ((100 Base Bx)) and Multimode ((100 Base SX))

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 10.
How serial port and parallel port differ?
Answer:
It will send 1 bit at one time whereas the parallel port will send 13 bit at one time.

Question 11.
What is the use of serial and parallel interface?
Answer:
The Serial and Parallel interface cables are used to connect the Internet to the system.

Question 12.
What is the purpose of cross-over cable?
Answer:
Cross over cable is used to join two network devices of the same type

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 13.
What is RJ Network?
Answer:
A Registered Jack (RJ) is a network interface

Question 14.
Where is the RJ11 cable used?
Answer:
RJ11 jack is mainly used in telephone and landlines

Question 15.
What is the use of a crimping tool?
Answer:
The crimping tool is used to connect the patch wire and the Ethernet connector.

Question 16.
What is an Ethernet port?
Answer:
The Ethernet port is the jack where the Ethernet cable is to be connected.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 17.
What is an Ethernet cable?
Answer:
The Ethernet cable is the basic component of the Local Area Network

Question 18.
What is the purpose of using Fiber optic cable?
Answer:
Fiber optic cables are used in Wide Area Network (WAN).

Question 19.
What is a dongle?
Answer:
The dongle is a small peripheral device which has compatible with mobile broadband.

Question 20.
How the internet is connected through a dongle?
Answer:
A sim slot in it and connects the Internet and acts as a modem to the computer.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Abbreviation:

  1. ARPANET – Advanced Research Project Agency Network
  2. WWW – World Wide Web
  3. W3C – World Wide Web Consortium
  4. LAN – Local Area Network
  5. WAN – Wide Area Network
  6. UTP – Unshielded Twisted Pair
  7. STP – Shielded Twisted pair
  8. NIC – Network Interface Card
  9. USB – Universal Serial Bus
  10. RJ – Registered Jack
  11. 8P8C – 8-position, 8-contact

Find The Odd One On The Following

l. (a) Media Bridge
(b) 50feet coaxial cable
(c) 10BASE-T
(d) CL2
Answer:
(c) 10BASE-T

2. (a) 100BaseBX
(b) 100BaseSX
(c) WAN
(d) 10 Base T
Answer:
(d) 10 Base T

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

3. (a) Keyboard
(b) Monitor
(c) Mouse
(d) peripheral devices
Answer:
(b) Monitor

4. (a) Smartphones
(b) GPS devices
(c) Digital cameras
(d) Mouse
Answer:
(d) Mouse

5. (a) Speakers
(b) Infra Red
(c) Blue tooth
(d) WiFi
Answer:
(a) Speakers

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

6. (a) RJ45Connector
(b) UTP Cable
(c) coaxial cable
(d) plastic covering
Answer:
(c) coaxial cable

7. (a) USB cable
(b) RJ45 Connector
(c) Ethernet Ports
(d) Crimping Tools
Answer:
(a) USB cable

8. (a) White Green
(b) White Red
(c) White Orange
(d) White brown
Answer:
(b) White Red

9. (a) Cat 5
(b) Cat 6e
(c) Cat 7
(d) Cat 5e
Answer:
(d) Cat 5e

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

10. (a) RJ-11
(b) RJ-21
(c) RJ-08
(d) RJ-45
Answer:
(c) RJ-08

11. (a) Registered Jack
(b) Mobile
(c) 6pin
(d) Landlines
Answer:
(b) Mobile

12. (a) ChampConnector
(b) Amphenol Connector
(c) Wireless Connector
(d) RJ21
Answer:
(c) Wireless Connector

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

13. (a) Champ over
(b) Cross Over
(c) Straight Through
(d) Roll Over
Answer:
(a) Champ over

14. (a) T568A
(b) T568B
(c) Tx, Rx lines
(d) RJ-28
Answer:
(d) RJ-28

15. (a) Twisted pair
(b) UTP
(c) FTP
(d) STP
Answer:
(c) FTP

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Choose The Incorrect Pair:

1. a) Media Bridge 50-feet Coaxial cable, Amazon basicsCL2-Rated Coaxial cables.
b) Unshielded Twisted Pair and Shielded Twisted pair.
c) USB cables and Parallel cables
d) Single-Mode and Multimode
Answer:
c) USB cables and Parallel cables

2. a) Serial and Parallel cables
b) Patch Cable, RJ45 Connector
c) Ethernet Ports, Crimping Tool
d) Coaxial cable, Serial Port
Answer:
d) Coaxial cable, Serial Port

3. a) Ethernet cable and serial cable
b) RJ45 plug, Ethernet connector.
c) Rj45 jack, Ethernet Port
d) RJ45, 802.3
Answer:
a) Ethernet cable and serial cable

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

4. a) RJ-11, RJ-45
b) RJ-45 and RJ47
c) RJ-14 and RJ-61
d) RJ-21, RJ-28
Answer:
b) RJ-45 and RJ47

5. a) USB cables, Peripheral devices
b) Coaxial cables, 10 Mbps
c) Ethernet port, LAN port
d) Parallel port, 100BaseSX
Answer:
d) Parallel port, 100BaseSX

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Match The Following:

Question 1.
A) Tim Berners Lee -1) WAN
B) Coaxial cables – 2) WWW
C) Twisted pair – 3) CL2 Related coaxial
D) Fiber optics cable – 4) STP
a) 1 2 3 4
b) 2 31 4
c) 4 3 2 1
d) 2 3 4 1
Answer:
d) 2 3 4 1

Question 2.
A) Coaxial cables – 10gbps
B) Twisted pair – 100 BASE-BX
C) Fiber optics cable – 100 GBASE-T
D) Ethernet Cable -10 Mbps
a) 1 2 3 4
b) 2 31 4
c) 4 3 2 1
d) 2 3 4 1
Answer:
c) 4 3 2 1

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 3.
A) RJ45 connector -1) Crimping Tool
B) Ethernet -2) Small 8 jack inside
C) Expansion card -3) NIC
D) RJ45 Cable -4) Ethernet cable
a) 1234
b) 2 31 4
c) 4 3 2 1
d) 2 3 4 1
Answer:
d) 2 3 4 1

Question 4.
A) Ethernet Technology – RJ45, 802.3
B) RJ45 Connector(male) – RJ45 plug, Ethernet connector, 8P8C connector
C) RJ45 socket (female) – Rj45 jack, Ethernet Port
D) RJ45 Cable – Ethernet cable
a) 1 2 3 4
b) 2 31 4
c) 4 3 2 1
d) 2 3 4 1
Answer:
a) 1 2 3 4

Question 5.
A) RJ11 Jack – Peripheral devices
B) RJ45 Connector – Telephones and landlines
C) USB Cables – Crimping Tool
D) Cross over cable – Null modem Cables
a) 1 2 3 4
b) 2 31 4
c) 4 3 2 1
d) 2 3 4 1
Answer:
b) 2 31 4

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Part B

Short Answers

Question 1.
Write a note on coaxial cables?
Answer:
Coaxial Cables:
This cable was invented in the late 1880s, which is used to connect television sets to home antennas. This cable is used to transfer the information in 10 Mbps.

Question 2.
What is mean by Expansion card?
Answer:

  • The expansion card is a separate circuit board also called PCI.
  • Ethernet card is inserted into a PCI slot on the motherboard of a computer.

Question 3.
Mention the different types of cables used to connect the computer on Network?
Answer:
Computers can be connected on the network with the help of wired media (Unshielded Twisted pair, shielded Twisted pair, Co-axial cables, and Optical fiber) or wireless media (Infra Red, Bluetooth, WiFi)

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 4.
List the type of Network cables
Answer:

  1. Coaxial Cables
  2. Twisted Pair Cables
  3. Fiber Optics
  4. USB Cables
  5. Serial and Parallel cables
  6. Ethernet Cables

Question 5.
Give the Pin details of RJ-11?
Answer:
Pin details of the RJ-11, there is 6 pin where the two pins give the transmission configuration, the two pins give the receiver configuration and the other two pins will be kept for reserved. The two-pin will have the positive terminal and the negative terminal.

Question 6.
What are the two types of twisted-pair cables?
Answer:
There are two types of twisted pair cables,

  1. Unshielded Twisted Pair (UTP) and
  2. Shielded Twisted pair (STP).

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 7.
What is the use of UTP?
Answer:

  • The UTP is used nowadays as modern cables for the Internet and they are lower in cost and installation and maintenance is easy compared to the coaxial cables.
  • STP is similar to UTP, but it is covered by an additional jacket to protect the wires from External interference.

Question 8.
Write about Fiber Optics
Answer:

  • Fiber Optics cable is different from the other two cables.
  • The other two cables had an insulating material at the outside and the conducting material like copper inside.
  • But in this cable it is of strands of glass and pulse of light is used to send the information.

Question 9.
What are the two types of fiber optic cables available,
Answer:
There are two types of fiber optic cables available

  1. Single-mode (100BaseBx) another
  2. Multimode (100BaseSX).

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Question 10.
What is the use of a Single-mode Cable?
Answer:
Single-mode cables are used for long-distance transmission and at a high cost.

Question 11.
What is the use of Multi-Mode Cable?
Answer:

  • Multimode cables are used for short-distance transmission at a very low cost.
  • The optic cables are easy to maintain and install.

Question 12.
What is the use of Micro USB?
Answer:
Micro USB is a miniaturized version of the USB used for connecting mobile devices such as smartphones, GPS devices, and digital cameras.

Question 13.
What is the use of cross-over Cable?
Answer:
Cross over cable is used to join two network devices of the same type for example two PCs or two network devices.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Part C

Explain In Brief Answer

Question 1.
Compare UTP and STP?
Answer:
UTP: The UTP is used nowadays as modem cables for the Internet and they are lower in cost and installation and maintenance is easy compared to the coaxial cables.

STP: STP is similar to UTP, but it is covered by an additional jacket to protect the wires from External interference.

Question 2.
How to determine the type of Ethernet Cable?
Answer:

  1. Straight-through: The coloured wires are in the same sequence at both ends of the cable.
  2. Cross-over: The first coloured wire at one end of the cable is the third coloured wire at the other end of the cable.
  3. Poll-over: The coloured wires are in the opposite sequence at either end of the cable.

Samacheer Kalvi 12th Computer Applications Guide Chapter 13 Network Cabling

Part D

Explain In Detail

Question 1.
Explain the Crimping process to make Ethernet cables?
Answer:
Crimping process for making Ethernet cables

  1. Cut the cable with the desired length
  2. Strip the insulation sheath about 1 inch from both ends of the cable and expose the Twisted pair of wires
  3. After stripping the wire, untwist the smaller wires and arrange them into the proper wiring scheme, T568B preferred generally.
  4. Bring the wires tighter together and cut them down so that they all have the same length ( Vi inch).
  5. Insert all 8 coloured wires into the eight grooves in the connector. The wires should be, inserted until the plastic sheath is also inside the connector.
  6. Use the crimping tool to lock the RJ45 connector on the cable. It should be strong enough to handle manual traction. Now it is ready for data transmission.
  7. Use a cable tester to verify the proper connectivity of the cable, if need.

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Tamilnadu State Board New Syllabus Samacheer Kalvi 12th Computer Applications Guide Pdf Chapter 14 Open Source Concepts Text Book Back Questions and Answers, Notes.

Tamilnadu Samacheer Kalvi 12th Computer Applications Solutions Chapter 14 Open Source Concepts

12th Computer Applications Guide Open Source Concepts Text Book Questions and Answers

Part I

Choose The Correct Answers

Question 1.
If the source code of a software is freely accessible by the public, then it is known as
a) freeware
b) Firmware
c) Open source
d) Public source
Answer:
c) Open source

Question 2.
Which of the following is a software pro¬gram that replicates the functioning of a computer network?
a) Network software
b) Network simulation
c) Network testing
d) Network calculator
Answer:
b) Network simulation

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 3.
Which of the following can document every incident that happened in the simulation and are used for examination?
a) Net Exam
b) Network hardware
c) Trace file
d) Net document
Answer:
c) Trace file

Question 4.
Which is an example of network simulator?
a) simulator
b) TCL
c) Ns2
d) C++
Answer:
c) Ns2

Question 5.
Fill in the blanks: NS2 comprises of key languages?
a) 13
b) 3
c) 2
d) 4
Answer:
c) 2

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 6.
Choose the Correct Pair from the following to build NS2
a) UNIX & TCL
b) UNIX & C++
c) C++ & OTCL
d) C++ & NS2
Answer:
c) C++ & OTCL

Question 7.
Which of the following is not a network simulation software?
a) Ns2
b) OPNET
c) SSFNet
d) C++
Answer:
a) Ns2

Question 8.
Which of the following is a open source network monitoring software?
a) C++
b) OPNET
c) Open NMS
d) OMNet++
Answer:
c) Open NMS

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 9.
Open NMS was released in
a) 1999
b) 2000
c) 2003
d) 2004
Answer:
d) 2004

Question 10.
OpenNMS Group was created by
a) Balog
b) Matt Brozowski
c) David Flustace
d) All of them.
Answer:
d) All of them.

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Part II

Short Answers

Question 1.
Explain the History of open-source software.
Answer:
History of open source software:

  1. In the early day of computing, programmers and developers shared software in order to learn from each other
  2. Eventually, it moved to the wayside of commercialization of software in 1970-1980
  3. The Netscape communication corporation released their popular Netscape Communicator Internet suite as free software. This made others look into how to bring the free software ideas.
  4. The Open Source Initiative was founded in Feb 1998 to encourage the use of the new term open-source.

Question 2.
What is meant by a network simulator?
Answer:

  • A network simulator is a software program that replicates the functioning of a computer network.
  • In simulators, the computer network is typically demonstrated with devices, traffic etc. and the performance is evaluated.

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 3.
What is a trace file?
Answer:
A significant output of the simulation is the trace files. Trace files can document every incident that happened in the simulation and are used for examination.
C++ and Object-oriented Tool Command Language (OTCL) and network monitoring.

Question 4.
Write short notes on NS2.
Answer:
NS2 is the abbreviation of NETWORK SIMULA-TOR version 2. NS2 has C++ and Object-oriented Tool Command Language (OTcl) of languages 2. It is one the open-source application software

Question 5.
Explain NRCFOSS.
Answer:
NRCFOSS: National Resource Centre for Free and Open Source Software an Institution of Government of India. To help in the development of FOSS in India.

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 6.
Write a short note on Open NMS?
Answer:
There are two types in this Meridian and Horizon.

  • Meridian: When we need stability and long-term support choose Meridian which is best for Enterprises as well as businesses.
  • Horizon: Horizon used where innovation occurs frequently. It is Best for IT-ecosystem, new technologies monitoring.

Part III

Explain In Brief Answer

Question 1.
What are the uses of Open source Network Software?
Answer:

  • There are many opensource softwares, so, we can select and use any software that suits our needs.
  • The software can be used without any cost and restrictions.
  • We can share our ideas with the team.
  • We can learn many ideas and make our program writing skills more efficient.
  • We can add the most required features to the software User friendly.

Question 2.
Explain Free software.
Answer:
Free software a concept developed in the 1980s by an MIT computer science researcher, Richard Stallman is defined by four conditions, as outlined by the nonprofit Free Software Foundation.

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 3.
List out the Popular open-source software.
Answer:

  • NS2 , OPEN NMS, Ubuntu , MySQL, PDF Creator, Open Office, 7zip, GnuCash, GIMP, BLENDER,
  • AUDACITY, VLC, MOZILAi FIREFOX, MAGENTO, ANDROID, PHP

Question 4.
Write note on open source hardware.
Answer:
In this period of increased competition and cyber crimes, the computers used by indivudals or business organisations may have spy hardwares of rivals. Open source hardware technology helps in such threats. In this technique we get the components of the hardware and its circuit diagram, so that we can remove suspicious spyware if found.

Question 5.
What are the main functional areas of Open NMS?
Answer:

  1. Service monitoring, where a number of monitor modules can govern if network-based services (ICMP, HTTP, DNS, etc.) are accessible.
  2. Data Gathering by using SNMP and JMX.
  3. Event management and notifications, which comprises alarm reduction and a robust announcement system with accelerations and duty schedules.

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 6.
Explain Types of Organizations related to Open Source.
Answer:

  1. Organizations related to Open Source
  2. Apache Software Foundation
  3. The Document Foundation The Eclipse Foundation
  4. Free Software Foundation
  5. Linux Foundation
  6. OpenCourseWare Consortium
  7. Open Source Initiative

Part IV

Explain In Detail

Question 1.
Differentiate Proprietary and open-source software.
Answer:

                      Open Source Software

Proprietary Software

It is developed and tested through open collaboration It is owned by the indi­vidual or the organiza­tion that developed if
Anyone with the aca­demic knowledge can access, inspect, modi­fy and redistribute the source code. Only the owner or pub­lisher who holds the legal property rights of the source code can ac­cess it.
The project is managed by an open-source community of develop­ers and programmers The project is managed by a dosed group of in­dividuals or a team that developed it
They are not aimed at unskilled users outside of the programming community There are focused on a limited market of both skilled and unskilled end users
It Provides better flex­ibility which means more freedom which encourages innovation There is a very limit­ed scope of innovation with the restrictions and all
Example; Android, Firefox etc Example: Windows, macOS

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 2.
List out the Benefits of Open Source Software.
Answer:
There are many open source softwares, so, we can select and use any software that suits our needs.

  • The complete options of the software can be used without any cost and restrictions.
  • We can share our ideas with the team, write the required code and share it with many.
  • As we can identify the programming techniques of group members, we can learn many ideas and make our program writing skills more efficient.
  • The coding in open source softwares is being groomed by many enthusiastic members of the group. So if we report problems that we have in the program they are quickly mended by the group’s effort.
  • As we can make changes to the open-source softwares, we can add the most required features in the software.
  • Much open-source software is very user friendly.

Question 3.
Explain various Open Source Licenses.
Answer:
Types of open source license

  1. Apache License 2.0
  2. BSD 3-Clause “New” or “Revised” license
  3. BSD 2-Clause “Simplified” or “FreeBSD” license
  4. GNU General Public License (GPL)
  5. GNU Library or “Lesser” Genera! Public License (LGPL)
  6. MIT license
  7. Mozilla Public License 2.0
  8. Common Development and Distribution License
  9. Eclipse Public License
  10. When you change the source code. OSS requires the inclusion, of what you altered as well as your methods.
  11. The software created after code modifications may or may not be made available for free.

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

12th Computer Applications Guide Open Source Concepts Additional Important Questions and Answers

Part A

Choose The Correct Answers:

Question 1.
…………… software has been developed by a variety of programmers.
a) Open source
b) Free Software
c) Proprietary’ Software
d) All of these
Answer:
a) Open source

Question 2.
Proprietary Software is owned by an …………………………
(a) Organization
(b) Individual
(c) both a and b
(d) none of these
Answer:
(c) both a and b

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 3.
Which of the following organization is not related to Open Source?
a) Apache Software Foundation
b) The Document Foundation
c) The Eclipse Foundation
d) Initiative Foundation.
Answer:
d) Initiative Foundation.

Question 4.
The free software concept is developed in ……………
a) 1980s
b) 1970s
c) 1990s
d) None of the above
Answer:
a) 1980s

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 5.
Pick the odd one out
(a) Apache Software Foundation
(b) The document Foundation
(c) The Eclipse Foundation
(d) The round Foundation
Answer:
(d) The round Foundation

Question 6.
Which of the following is not an open-source application?
a) AUDACITY
b) VLC
c) Mozilla Firefox
d) MS Office
Answer:
d) MS Office

Question 7.
BOSS developed by ……………………..
(a) A-DAC
(b) M-DAC
(c) D-MAC
(d) C-DAC
Answer:
(d) C-DAC

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 8.
…………… a pure event base software tool with super simulation design
a) OpenNMS
b) API
c) NS2
d) OTCL
Answer:
b) API

Question 9.
How many Indian Languages are supported by BOSS?
(a) 15
(b) 10
(c) 5
(d) many
Answer:
(d) many

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 10.
In OpenNMS, Data are Gathering by using ……………..
a) SNMP
b) JMX
c) Both a and b
d) None of these
Answer:
c) Both a and b

Question 11.
Which of the following is a network-based service?
a) ICMP
b) HTTP
c) DNS
d) All of the above
Answer:
d) All of the above

Question 12.
The free software was developed in the year …………………….
(a) 1972
(b) 1978
(c) 1980
(d) 2003
Answer:
(c) 1980

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Abbreviation

  1. NRCFOSS- National Resource Centre for Free and Open Source Software
  2. BOSS – Bharat Operating System Solutions
  3. C-DAC – Centre for Development of Advanced Computing
  4. GNU – General Public License
  5. FCAPS – Fault, configuration, accounting, performance, security
  6. NMS – Network Management System)
  7. OTCL – Object-oriented Tool Command Language
  8. SSFNet – Scalable Simulation Framework Net Models
  9. API – Application Program Interface
  10. SOURCE CODE – Set of Instructions that decide, how the software should work
  11. NS2 – Network Simulation 2
  12. OpenNMS – Open Source Network Management Software

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Assertion And Reason

Question 1.
Assertion (A): In a computer network, network simulation is a method whereby a software program models the activities of a network by calculating the communication between the different network objects such as(routers, nodes, switches, access points, links etc.).
Reason(R): A network simulator is a software program that replicates the functioning of a computer network.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:

Question 2.
Assertion (A): There is much Open Source software. So, we can select and use any software that suits our needs.
Reason(R): The complete options of the software can be used without any cost and restrictions.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 3.
Assertion (A): Open NMS (Network Management System) is a free and open-source initiative grade network monitoring and management platform.
Reason(R); It is established and maintained by a community of users, developers and by the Open NMS Group, it offering services, training and support.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)

Question 4.
Assertion (A); Service monitoring, where a number of monitor modules can govern if network-based services (ICMP, HTTP, DNS, etc.) are accessible.
Reason(R): Data Gathering by using HTML and JSP.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
c) (A) is true and (R) is false

Question 5.
Assertion (A): AJAX has C++and Object-oriented Tool Command Language (OTCL) of languages
Reason(R): NS2 link together for C++ and the OTCL using TCLCL.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
d) (A) is false and (R) is true

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Match The Following:
1. Richard Stallman – Software Program
2. BOSS – Open-source Application software
3. BSD 2-Clause – LGPL
4. BSD 3-Clause – Free software concept
5. GNU Library – Data Gathering
6. NS2 – Revised license
7. Open NMS – C++, OTCL
8. Network Simulation – FCAPS
9. BLENDER – Free BSD license
10. SNMP – C-DAC
Answers
1. Free software a concept
2. C-DAC
3. FreeBSD license
4. Revised license
5. LGPL
6. C++, OTCL
7. FCAPS
8. Software Program
9. Open source Application software
10. Data Gathering

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Very Short Answers

Question 1.
What is a trace file?
Answer:
Trace file is a document file, consists of every incident that happens in a simulation.

Question 2.
What is the use of Network monitoring software notifications?
Answer:
It is used to help the user or administrator for fixed errors.

Question 3.
Mention some large enterprise management products?
Answer:
HP Open View, IBM Micro muse or IBM Tivoli.

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 4.
How NS2 links C++ and OTCL?
Answer:
It links together for C++ and the OTCL using TCLCL.

Question 5.
What is the use of trace files?
Answer:
Trace files can document every incident that happened in the simulation and are used for examination.

Question 6.
What does open-source denote?
Answer:
Open Source denotes some program whose I source code is made available for usage

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Find The Odd One On The Following

1. (a) Support
(b) Training
(c) Edit Source By User
(d) Security
Answer:
(c) Edit Source By User

2. (a) Apache
(b) Microsoft
(c) Linux
(d) Document
Answer:
(b) Microsoft

3. (a) GUI
(b) GPL
(c) LG PL
(d) MIT
Answer:
(a) GUI

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

4. (a) Routers
(b) Nodes
(c) OpenSource
(d) Access points
Answer:
(c) OpenSource

5. (a) Openoffice
(b) VLC
(c) Microsoft word
(d) NS2
Answer:
(c) Microsoft word

6. (a) Fault
(b) Communication
(c) Accounting
(d) Performance
Answer:
(b) Communication

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

7. (a) Event Management
(b) Service Monitoring
(c) Data Collection
(d) MAGENTO
Answer:
(d) MAGENTO

8. (a) ICMP
(b) HTTP
(c) JMX
(d) DNS
Answer:
(c) JMX

9. (a) Mozilla Firefox
(b) Chrome
(c) Internet Explorer
(d) Android
Answer:
(d) Android

10. (a) Bjarne Stroustrup
(b) Steve Giles
(c) Brian Weaver
(d) LukeRindfuss.
Answer:
(a) Bjarne Stroustrup

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Important Years To Remember:

1980 Free software concept developed
1999 Open NMS was released by Steve Giles, Brian Weaver, and Luke Rindfuss
2004 OpenNMS Group was created by Balog, Matt Brozowski, and David Hustace

Part B

Short Answers

Question 1.
Write a short note on open source software and developers?
Answer:
Open-Source Software and Developers:
OSS projects are collaboration opportunities that improve skills and build connections in the field. Domains that developers can contribute to the open-source community include:

  1. Communication tools.
  2. Distributed revision control systems.
  3. Bug trackers and task lists.
  4. Testing and debugging tools.

Question 2.
What is the network simulator?
Answer:

  • A network simulator is a software program that replicates the functioning of a computer network.
  • In simulators, the computer network is typically demonstrated with devices, traffic etc. and the performance is evaluated.

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 3.
Write a short note on BOSS.
Answer:

  • BOSS (Bharat Operating System Solutions) Operating System Developed in India by C-DAC (Centre for Development of Advanced Computing) Help to prompt the use of open-source software in India.
  • It Supports many Indian languages.

Part C

Explain In Brief Answer

Question 1.
Write some Organizations related to Open Source.
Answer:

  • Apache Software Foundation
  • The Document Foundation
  • The Eclipse Foundation
  • Free Software Foundation
  • Linux Foundation
  • Open Courseware Consortium
  • Open Source Initiative

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 2.
List the various types of open NMS?
Answer:
There are two types in this Meridian and Horizon.

  • Meridian: When we need stability and long-term support choose Meridian which is best for Enterprises as well as businesses.
  • Horizon: Horizon used where innovation occurs frequently. It is Best for IT-ecosystem, new technologies monitoring.

Question 3.
Write a short note on Open-Source Software and Developers
Answer:

  • OSS projects are collaboration opportunities that improve skills and build connections in the field.
  • Domains that developers can contribute to the open-source community include:
    • Communication tools.
    • Distributed revision control systems.
    • Bug trackers and task lists.
    • Testing and debugging tools.

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Part D

Explain In Detail

Question 1.
Differentiate Open Source Software with free software?
Answer:
Open-Source Software vs. Free Software:
Although the terms are often used interchangeably, OSS is slightly different from free software. Both deal with the ability to download and modify software without restriction or charge.

However, free software a concept developed in the 1980s by an MIT computer science researcher, Richard Stallman is defined by four conditions, as outlined by the nonprofit Free Software Foundation. These “four freedoms” emphasize the ability of users to use and enjoy software as they see fit.

In contrast, the OSS criteria, which the Open Source Initiative developed a decade later, place more emphasis on the modification of software, and the consequences of altering source code, licensing, and distribution.

Obviously, the two overlap; some would say the differences between OSS and free software are more philosophical than practical. However, neither should be confused with freeware. Freeware usually refers to proprietary software that users can download at no cost, but whose source code cannot be changed.

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 2.
Explain in detail about Open NMS.
Answer:

  • Open NMS (Network Management System) is a free and open-source initiative-grade network monitoring and management platform.
  • It is established and maintained by a community of users, developers, and the Open NMS Group.
  • It offering services, training, and support.

The goal is for Open NMS

  • The goal is for Open NMS to be an actually distributed, scalable management application platform for all features of the FCAPS (Fault, Configuration, Accounting, Performance, Security) network management model.
  • Presently the emphasis is on Fault and Performance Management.
  • It was intended to cope with tens of thousands of devices from a single server as well as achieve unlimited devices using a cluster of servers.

Features:

  • OpenNMS comprises a discovery engine to routinely configure and manage network devices without operator intervention. It is written in Java and is issued under the GNU (General Public License.)
  • OpenNMS is the World’s first software for Network monitor and management with open-source options.

OpenNMS- Types:
There are two types in this Meridian and Horizon.
Meridian: When we need stability and long-term support choose Meridian which is best for Enterprises as well as businesses.
Horizon:

  • It is used where innovation occurs frequently.
  • It is Best for IT-ecosystem, new technology monitoring.

History:

  • OpenNMS was Released in 1999 by Steve Giles, Brian Weaver, and Luke Rindfuss.
  • In 2004 OpenNMS Group was created by Balog, Matt Brozovvski, and David Hustace.
  • It is written in Java and can run on all type of platform,
  • It gives us Event management & Notification, Discovery & Provisioning, service monitoring, and Data Collection.
  • Won lot of awards for best of open-source software.

Samacheer Kalvi 12th Computer Applications Guide Chapter 14 Open Source Concepts

Question 3.
Explain in Detail Open NMS?
Answer:
Open NMS

  • Open NMS (Network Management System)is a free and open-source initiative-grade network monitoring and management platform.
  • It is established and maintained by a community of users, developers, and by the Open NMS
    Group, it offering services, training, and support.
  • The goal is for Open NMS to be an actually distributed, scalable management application platform for all features of the FCAPS (Fault, configuration, accounting, performance,
    security) network management model.
  • Presently the emphasis is on Fault and Performance Management.
    It was intended to cope with tens of thousands of devices from a single server as well as achieve unlimited devices using a cluster of servers.
  • Open NMS comprises a discovery engine to routinely configure and manage network devices without operator intervention.
  • It is written in Java and is issued under the GNU (General Public License.)
  • Open NMS is the Worlds first software for Network monitor and management with open source options. There are two types in this Meridian and Horizon.
  • When we need stability and long-term support choose Meridian which is best for Enterprises as well as businesses, for Horizon used where innovation occurs frequently. It is Best for IT-ecosystem, new technologies monitoring.

Open Source Hardware:

  1. Remix
  2. Remake
  3. Remanufacture
  4. Redistribute
  5. Resell
  6. Study and Learn

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Tamilnadu State Board New Syllabus Samacheer Kalvi 12th Computer Applications Guide Pdf Chapter 15 E-Commerce Text Book Back Questions and Answers, Notes.

Tamilnadu Samacheer Kalvi 12th Computer Applications Solutions Chapter 15 E-Commerce

12th Computer Applications Guide E-Commerce Text Book Questions and Answers

Part I

Choose The Correct Answers

Question 1.
A company can be called E-Business if
a) it has many branches across the world.
b) it conduct business electronically over the Internet.
c) it sells commodities to a foreign country.
d) it has many employees.
Answer:
b) it conduct business electronically over the Internet.

Question 2.
Which of the following is not a tangible good?
a) Mobile
b) Mobile Apps
c) Medicine
d) Flower bouquet
Answer:
b) Mobile Apps

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 3.
SME stands for
a) Small and medium sized enterprises
b) Simple and medium enterprises
c) Sound messaging enterprises
d) Short messaging enterprises
Answer:
a) Small and medium sized enterprises

Question 4.
The dotcom phenomenon deals with
a) Textile industries
b) Mobile phone companies
c) Internet based companies
d) All the above
Answer:
c) Internet based companies

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 5.
Which of the following is not correctly matched
a) The First Wave of Electronic Commerce: 1985 -1990
b) The Second Wave of Electronic Commerce: 2004 -2009
c) The Third Wave of Electronic Commerce: 2010 – Present
d) Dotcom burst: 2000 – 2002
Answer:
a) The First Wave of Electronic Commerce: 1985 -1990

Question 6.
Assertion (A): The websites of first wave dot.com companies were only in En-glish
Reason (R The dot com companies of first wave are mostly American companies.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)

Question 7.
Off-shoring means
a) Work outsourced to a branch of its own company
b) Work outsourced to new employees
c) Work outsourced to a third party locally
d) Work outsourced to a third party outside its own country
Answer:
d) Work outsourced to a third party outside its own country

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 8.
G2G systems are classified into
a) Internal facing and external facing
b) Internet facing and Extranet facing
c) Internal flag and external flag
d) Internet flag and Extranet flag
Answer:
a) Internal facing and external facing

Question 9.
host the e-books on their websites.
a) Bulk-buying sites
b) Community sites
c) Digital publishing sites
d) Licensing sites
Answer:
c) Digital publishing sites

Question 10.
Which of the following is not a characteristics of E-Commerce
a) Products cannot be inspected physically before purchase.
b) Goods are delivered instantly.
c) Resource focus supply side
d) Scope of business is global.
Answer:
d) Scope of business is global.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Part II

Short Answers

Question 1.
Define E-Commerce.
Answer:
E-Commerce can be described as the process of buying or selling products, services, or information via computer networks.

Question 2.
Distinguish between E-Business and E-Commerce
Answer:

E-Commerce

E-business

1. E-commerce in­volves commercial transactions done over the internet. 1. E-business is the conduct of business processes on the internet
2. E-commerce is a subset of E-business. 2. E-business is a superset of E-business.
3. E-commerce usu­ally requires the use of just a website. 3. E-business involves the use of CRM’S, ERP that connect different business processes.
4. E-commerce just involves buying and selling of products and services. 4. E-business includes all kind of pre-sale and post-sale efforts.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 3.
Differentiate tangible goods and electronic goods with an example of your own.
Answer:

Tangible goods

Electronic goods

A physical item that can be perceived by the sense of touch. Components for controlling the flow of electrical currents for the purpose of informa­tion processing and system control.
Example:  cars,  food items, com­puters, Example: Goods with tran­sistors and diodes.

Question 4.
What are dotcom bubble and dotcom burst?
Answer:
Dotcom Bubble:

  1. The Dotcom Bubble was a historic excessive growth (excessive assumption) of the economy that occurred roughly between 1995 and 2000.
  2. During the dotcom bubble, the value of equity markets grew exponentially with the NASDAQ composite index of US stock market rising from under 1000 points to more than 5000 points.

Dotcom Burst:

  1. The Nasdaq-Composite stock market index fell from 5046.86 to 1114.11. This is infamous, known as the Dotcom Crash or Dotcom Burst.
  2. This began on March 11, 2000, and lasted until October 9, 2002. During the crash, thousands of online shopping companies, like Pets.com failed and shut down.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 5.
Write a short note on out-sourcing.
Answer:
Out-sourcing is generally associated with B2B E-Commerce. If a company’s work is hired by another company, it would be termed as out-sourcing.

Part III

Explain In Brief Answer

Question 1.
Describe how E-Commerce is related to socio-technological changes.
Answer:

  • The growth of E-Commerce is also related to socio-technological changes.
  • The more, the medium becomes deep-rooted, the more, are the users drawn towards it.
  • An increase of users increases the markets.
  • As the markets expand, more business organizations are attracted.
  • The more businesses accumulate it creates competition.
  • The competition leads to innovation.
  • Innovation in turn drives the development of technology.
  • Technology facilitates E-Commerce’s growth.

Question 2.
Write a short note on the third wave of E-Commerce.
Answer:
The Third Wave of Electronic Commerce: 2010 – Present

  1. The third wave is brought on by mobile technologies. It connects users via mobile devices for real-time and on-demand transactions, mobile technologies.
  2. It connects users via mobile devices for real-time and on-demand transactions.
  3. Not only the information is filtered by time, but also the geographic coordinates are used to screen the specific location-tailored information properly.
  4. The term Web 3.0, summarizes the various characteristics of the future Internet which include Artificial Intelligence, Semantic Web, Generic Database, etc.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 3.
Explain B2B module in E-Commerce.
Answer:

  • In B2B E-Commerce, commercial, transactions take place between different business organizations, through the Internet.
  • For example, a cycle company may buy tyres from another company for their cycles.
  • When compared to other models, the value per transaction in B2B transactions is high, because of bulk purchases.
  • The company also might get the advantage of discounts on bulk purchases.

Question 4.
Write a note on name-your-price websites.
Answer:
Name-your-price sites are just like normal retail sites. In contrast, the buyer negotiates with the retailer for a particular product or service, https://in.hotels.com/

Question 5.
Write a note on the physical product dispute of E-Commerce.
Answer:

  • Physical product disputes are a major disadvantage in E-Commerce.
  • E-Commerce purchases are often made on trust.
  • This is because; we do not have physical access to the product.
  • Though the Internet is an effective channel for visual and auditory information it does not allow full scope for our senses.
  • We can see pictures of the perfumes, but could not smell their fragrance; we can see pictures of a cloth, but not its quality.
  • If we want to inspect something, we choose what we look at and how we look at it. But in online shopping, we would see only the pictures the seller had chosen for us.
  • People are often much more comfortable in buying generic goods (that they have seen or experienced before and in which there is little ambiguity) rather than unique or complex things via the Internet.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Part IV

Explain in Detail

Question 1.
Write about the development and growth of Electronic Commerce.
Answer:
The Development and Growth of Electronic Commerce:
Economists describe four distinct waves (or phases) that occurred in the Industrial Revolution. In each wave, different business strategies were successful. Electronic commerce and the information revolution brought about by the Internet likely go through such a series of waves.

The First Wave of Electronic Commerce: 1995 -2003

  • The Dotcom companies of the first wave are mostly American companies. Thereby their websites were only in English. The Dotcom bubble had attracted huge investments to first wave companies.
  • As the Internet was a mere read-only web (web 1.0) and network technology was in its beginning stage, the bandwidth and network security were very low.
  • Only EDI and unstructured E-mail remained as a mode of information exchange between businesses.
  • But the first wave companies enjoyed the first-move advantage and customers had left with no options.

The Second Wave of Electronic Commerce: 2004 – 2009

  • The second wave is the rebirth of E-Commerce after the dot-com bust. The second wave is considered as the global wave, with sellers doing business in many countries and in many languages.
  • Language translation and currency conversion were focused on the second wave websites.
    The second wave companies used their own internal funds and gradually expanded their E-Commerce opportunities.
  • As a result, E-Commerce grows more steadily, though more slowly. The rapid development of network technologies and interactive web (web 2.0, a period of social media) offered the consumers more choices of buying. The increased web users nourished E-Commerce companies (mostly B2C companies) during the second wave.

The Third Wave of Electronic Commerce: 2010 – Present

  • The third wave is brought on by mobile technologies. It connects users via mobile devices for real-time and on-demand transactions, mobile technologies.
  • It connects users via mobile devices for real-time and on-demand transactions. Not only the information is filtered by time, but also the geographic coordinates are used to screen the specific location-tailored information properly.
  • The term Web 3.0, summarize the various characteristics of the future Internet which include Artificial Intelligence, Semantic Web. Generic Database etc.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 2.
List all the E-Commerce business models and explain any four briefly.
Answer:
The various E-Commerce business models are

  1. Business to Business (B2B)
  2. Business to Consumer (B2C)
  3. Business to Government (B2G)
  4. Consumer to Business (C2B)
  5. Consumer to Consumer (C2C)
  6. Consumer to Government (C2G)
  7. Government to Business (G2B)
  8. Government to Consumer (G2C)
  9. Government to Government (G2G)

1. Business to Business (B2B)

  • In B2B E-Commerce, commercial transactions take place between different business organizations, through the Internet.
  • For example, a cycle company may buy tyres from another company for their cycles.
  • B2B transaction is high, because of bulk purchases.

2. Business to Consumer (B2C)

  • In B2C E-Commerce, commercial transactions take place between business firms and their consumers.
  • It is the direct trade between companies and end-consumers via the Internet.
  • Example: A book company selling books to customers. This mode is intended to benefit the consumer and can say B2C E-Commerce works as a ‘retail store’ over the Internet.

3. Consumer to Consumer (C2C)
C2C in E-Commerce provides an opportunity for trading products or services among consumers who are connected through the Internet.

4. Consumer to Government (C2G)

  • Citizens as Consumers and Government engage in C2G E-Commerce.
  • Here an individual consumer interacts with the Government.
  • C2G models usually include income tax or house tax payments, fees for issuance of certificates or other documents. People paying for renewal of license online may also fall under this category.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 3.
Explain any five E-Commerce revenue models.
Answer:

  • Apart from the regular selling of commodities, today there are many other ways by which companies can make money from the Internet.
  • The other forms of E-Commerce activities are:

1. Affiliate site

  • It is a form of third-party marketing in which the site owner gets paid based on the performance.
  • This site may be a price comparison service or shopping directories or review sites or blogs that contain a link to a normal retailing site and are paid when a customer makes a purchase through it.
  • The affiliate site usually attracts visitors by offering more information and tutorials on some specific product or a topic.

2. Auction site:
It is a kind of website, that auctions items on the Internet and levies some commission from the sales, e.g. https://www.ebay.com/

3. Banner advertisement site:
It displays advertisements of other companies in its websites and thereby earns revenue.

4. Bulk-buying sites:
It collects a number of users together all of who want to buy similar items; the site negotiates a discount with the supplier and takes a commission. e.g. https://www.alibaba.com/

5. Digital publishing sites:

  • It effectively hosts e-books or magazines on the web.
  • They make profits in a number of ways such as advertising, selling, etc., https://wordpress. org/

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 4.
How would you differentiate traditional commerce and E-Commerce?
Answer:

Traditional Commerce

E-Commerce

Traditional commerce is buying or selling of products and services physically. E-Commerce carries out commercial transactions electronically on the Internet.
Customers can easily identify, authenticate and talk to the merchant. Neither customer nor merchant sees the other.
Physical stores are not feasible to be open all the time. It is always available at all times and all days of the year.                                                                     ‘
Products can be inspected physically before purchase. Products can’t be inspected physically before pur­chase.
Scope of business is limited to a particular area. The scope of business is global. Vendors can expand their business Worldwide.
The resource focuses Supply side. The resource focuses Demand side.
Business Relationship is Linear. Business Relationship is End-to-end.
Marketing is one-way marketing. One-to-one marketing.
Payment is made by cash, cheque, cards, etc. The payment system is mostly credit card and through fund transfer.
Most goods are delivered instantly. It takes time to transport goods.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 5.
What are the advantages and disadvantages of E-Commerce to a consumer?
Answer:
The pros and cons of E-Commerce affect three major stakeholders: consumers business organisations, and society.
The following are the advantages and disadvantages of E-Commerce for a consumer.

Advantages:
1. E-Commerce system is operated on all days and all the day. It is able to conduct business 24 × 7. Neither consumers nor suppliers need a physical stores to be opened to do business electronically. People can interact with businesses at the time of their convenience.

2. Speed is a major advantage in E-Commerce. Advanced Electronic communications systems allow messages to reach across the world instantaneously. There is no need to wait days for a catalogue to arrive by post. Communication delay is not a part of the Internet or E-Commerce world.

3. The Internet is too easy to ‘shop around’ for products and services that may be more cheaper and effective than left o buy only in a Brick and Mortar shop. It provides an opportunity to buy at reduced costs. It is possible to, explore the Internet, identify original manufacturers, thereby bypass wholesalers and achieve a cheaper price.

4. The whole world becomes a shop for today’s customers. They can have a wide choice by comparing and evaluating the same product at different websites before making a purchase decision.

5. Customers can shop from home or anywhere at their convenience. They don’t need a long wait to talk to a salesman. They can read the details regarding model numbers, prices, features, etc. of the product from the website and buy at their own convenience. Payments can also be made online.

Disadvantages:
1. E-Commerce is often used to buy goods that are not available locally but from businesses all over the world. Physical goods need to be transported, which takes time and costs money. In traditional commerce, when we walk out of a shop with an item, it’s ours; we have it; we know what it is, where it is, and how it looks. But in E-Commerce, we should wait between placing the order and having the product in hand. Some E-Commerce companies handle this by engaging their customers in updating the status of their shipments.

2. Unlike returning goods to a traditional shop returning goods online is believed to be an area of difficulty. The doubts about the period of returning, will the returned goods reach the source in time, refunds, exchange, and postage make one tiresome.

3. Privacy issues are serious in E-Commerce. In E-Commerce generating consumer information is inevitable. Not all companies use the personal information they obtained to improve services to consumers. Many companies misuse the information and make money out of it. It is true that privacy concerns are a critical reason why people get cold feet about online shopping.

4. Physical product disputes are a major disadvantage in E-Commerce. E-Commerce purchases are often made on trust. This is because we do not have physical access to the product. Though the Internet is an effective channel for visual and auditory information it does not allow full scope for our senses. We can see pictures of the perfumes, but could not smell their fragrance; we can see pictures of a cloth, but not it’s quality.

If we want to inspect something, we choose what we look at and how we look at it. But in online shopping, we would see only the pictures the seller had chosen for us. People are often much more comfortable in buying generic goods (that they have seen or experienced before and in which there is little ambiguity) rather than unique or complex things via the Internet.

5. We couldn’t think of ordering single ice cream or a coffee from a shop in Paris. Though specialized and refrigerated transport can be used, goods bought and sold via the Internet need to survive the trip from the supplier to the consumer. This makes the customers turn back towards traditional supply chain arrangements for perishable and non-durable goods.

6. Delivery ambiguity. Since supplying businesses can be conducted across the world, it can be uncertain whether they are indeed genuine businesses or just going to take our money. It is pretty hard to knock on their door to complain or seek legal recourse. Further, even if the item is sent, it is easy to start bothering whether or not it will ever arrive on time.
The following are some of the advantages and disadvantages of E-Commerce for a Business organisation.

The benefit of E-Commerce to a business organisation
Access to Global Market:
The Internet spans the world of E-Commerce, and it is possible to trade with any business or a person who is connected with the Internet. It helps to access the global marketplace. Simple local businesses such as herbal product stores are able to market and sell their products internationally using E-Commerce. Thus, the whole world becomes a potential market for an E-Commerce company.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

12th Computer Applications Guide E-Commerce Additional Important Questions and Answers

Part A

Choose The Correct Answers:

Question 1.
The term E-Business was coined by ……………………….
(a) Apple
(b) IBM
(c) Microsoft
(d) Sun Microsystems
Answer:
(b) IBM

Question 2.
The first online-only shop opens on ……………
a) 1991
b) 2000
c) 2005
d) 1999
Answer:
d) 1999

Question 3.
Find the wrong statement from the following.
(a) E-commerce is a subset of E-Business
(b) E-Business is a subset of E-Commerce
Answer:
(b) E-Business is a subset of E-Commerce

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 4.
The nascent stage is a ……………. of growth.
a) Initial stage
b) Secondary stage
c) final stage
d) None of these
Answer:
a) Initial stage

Question 5.
…………… is a platform for advertising products to targeted consumers.
a) Television
b) Radio
c) Mobile phones
d) social Media
Answer:
d) social Media

Question 6.
E-Commerce first emerged on private networks in ……………………….
(a) 1965
(b) 1967
(c) 1970
(d) 1972
Answer:
(c) 1970

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 7.
The First business to a business transaction from …………….
a) Amazon
b) e-bay
c)Thompson Holidays
d) reddiffshop
Answer:
c)Thompson Holidays

Question 8.
The First business to the business transaction was established in the year …………..
a) 1995
b) 1981
c) 1985
d)1987
Answer:
b) 1981

Question 9.
Who invented Teleputer?
(a) Michael Aldrich
(b) Sting’s
(c) Bob Frankston
(d) Dan Bricklin
Answer:
(a) Michael Aldrich

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 10.
The second wave of electronic commerce was …………..
a) 1995-2003
b) 1992-2003
c) 1993-2004
d) 2004-2009
Answer:
d) 2004-2009

Assertion And Reason

Question 1.
Assertion (A): E-Commerce can be described as the process of buying or selling products, services or information via computer networks
Reason(R): E-Commerce is not a completely new type of commerce
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)

Question 2.
Assertion (A): The growth of E-Commerce is also related to socio-technological changes.
Reason(R): Electronic commerce and the information revolution brought about by the Internet likely go through such a series of waves.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 3.
Assertion (A): The Dotcom Bubble was a historic excessive growth (excessive assumption) of economy
Reason(R): Dotcom Bubble occurred roughly between 1990 and 2000.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
c) (A) is true and (R) is false

Question 4.
Assertion (A): if a company’s work is hired to another company, it would be termed as out-sourcing.
Reason(R): If the work is outsourced to a company, which is outside of its own country, is termed off-shoring.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 5.
Assertion (A): Traditional commerce is buying or selling of products and services Physically.
Reason(R): Scope of business is Unlimited to a particular area.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
c) (A) is true and (R) is false

Question 6.
Assertion (A): In E-Commerce Payment system is mostly credit card and through fund transfer
Reason(R): Licensing sites allow other websites to make use of their software.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)

Question 7.
Assertion (A): Speed is a major disadvantage in E-Commerce.
Reason(R): The pros and cons of E-Commerce affect three major stakeholders: consumer’s business organizations, and society.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
d) (A) is false and (R) is true

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 8.
Assertion (A): FinTech Financial technology is a collective term for technologically advanced financial innovations
Reason(R): Fintech is a new financial industry that uses technology to improve financial activity.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)

Question 9.
Assertion (A): Web 2,0 (Web of Communication) If 7 is a read-write web that allowed users to interact with each other.
Reason(R): The dot-com bubble was a rapid rise in the U.S, equity market of Internet-based companies during the 1990s.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)

Question 10.
Assertion (A): Marketing plays a significant role in any business.
Reason(R): Marketing could be started as early as it could be,
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Find The Odd One On The Following

1. (a) Marketing
(b) Finance
(c) Negotiation
(d) Gateways
Answer:
(d) Gateways

2. (a) Internet
(b) Ethernet
(c) Extranet
(d) Intranet
Answer:
(b) Ethernet

3. (a) EDI
(b) email
(c) HTML
(d) http
Answer:
(c) HTML

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

4. (a) Online Transaction
(b) Electronic Payment
(c) SCM
(d) Inventory Management Systems
Answer:
(d) Inventory Management Systems

5. (a) Network Infrastructure
(b) Messaging
(c) Multimedia Content
(d) Globalization
Answer:
(d) Globalization

6. (a) Scientific Journals
(b) Dotcoms
(c) Fintech
(d) Startups
Answer:
(a) Scientific Journals

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

7.(a) B2B – 1981
(b) E-mail – 1985
(c) Zappo’s – 1999
(d) Groupon – 2008
Answer:
(b) E-mail-1985

8.(a) 24×7 Working
(b) Low Cost
(c) platform dependent
(d) low transaction cost
Answer:
(c) platform dependent

9. (a) dynamic application
(b) Interactive Services
(c) Machine to Machine Interaction
(d) Hyperlinks
Answer:
(d) Hyperlinks

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

10. (a) Television
(b) Computer
(c) Telecom
(d) Modem
Answer:
(d) Modem

11. (a) Web 1.0 : Content
(b) Web2,0: Communication
(c) Web 3,0 : Contex
(d) Web4,0 : 4G :Tech
Answer:
(d) Web4,0 : 4G :Tech

12. (a) Facebook
(b) Whatsapp
(c) twitter
(d) eBay
Answer:
(d) eBay

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Important Years To Remember:

1960 Electronic data interchange allows companies to carry out electronic transactions-a precursor to online Shopping
1979 English inventor Michael Aldrich connected a TV set to a computer with a phone line and created “teleshopping”
1981 The first business-to-business transaction from Thompson holidays
1984 The ‘Electronic mail’ is launched by CompuServe
1991 The National Science Foundation allows the internet to be used for commercial purposes
Aug 1994 Online retailer Net Market makes the ‘first secure retail transaction on the web’
Oct 1994 Joe McCambiey ran the first-ever online banner ad. It went like on Hot Wired.com and promoted 7 art museums.
July 1995 Amazon sold its first item – a science textbook
Sep 1995 eBay sold its first item – a broken laser pointer
1999 The first online-only shoe, Zappo’s, opens
2005 Social commerce (people using social me­dia in their buying decisions) is born thanks to networks like Facebook India
2008 Group on is launched
2009 India’s Total E-Commerce sale is3,9 billion American Dollar 1991 Oct 19
2018 With mobile commerce, it is expected to hike 265% up and will be $ 850 billion American Dollar

PERIOD

DEVELOPMENT AND GROWTH OF ELECTRONIC COMMERCE

1995 -2003 The First Wave of Electronic Commerce
2004 – 2009 The Second Wave of Electronic Commerce
2010- Present The Third Wave of Electronic Commerce

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Abbreviation:
1. B2B – Business to Business
2. B2C – Business to Consumer
3. B2G – Business to Government
4. C2B – Consumer to Business
5. C2C – Consumer to Consumer
6. C2G – Consumer to Government
7. G2B – Government to Business
8. G2C – Government to Consumer
9. G2G – Government to Government
10. SMEs – Small Medium-sized Enterprises
11. SCM – Supply Chain Management

Match The Following:
1. Business to Business – House tax payments
2. Business to Consumer – Bulk purchases
3. Business to Government – Similar to C2G
4. Consumer to Business – Advertisement Website
5. Consumer to Consumer – Retail store
6. Consumer to Government – Web of Context
7. Government to Business – Reduce burdens on business
8. Government to Consumer – Services by Government
9. Government to Government – Non-Commercial
10. Web 1.0 – Web of Content
11. Web 2.0 – Web of Communication
12. Web 3,0 – Travel Website
Answers
1. Bulk purchases
2. Retail store
3. Services by Government
4. Travel Website
5. Advertisement Website
6. House tax payments
7. Reduce burdens on business
8. Similar to C2G
9. Non Commercial
10. Web of Content
11. Web of Communication
12. Web of Context

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Very Short Answers

Question 1.
When a company is called an E-Business?
Answer:
A company can be called E-Business if and only if-

  1. It has the ability to conduct business electronically over the Internet.
  2. It manages payment transactions through the Internet.
  3. It has a platform for selling products & services via the Internet.

Question 2.
Expand FinTEch.
Answer:
Financial technology

Question 3.
What is FinTech?
Answer:
Fintech is a new finance industry technology to improve financial activity.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 4.
What do you mean by dot-com bubble?
Answer:
The dotcom bubble was a rapid rise in U.S. equity market of Internet-based companies during 1990s.

Question 5.
What is Traditional commerce?
Answer:
It is buying or selling of products and services physically.

Question 6.
What is E-Commerce?
Answer:
It carries out commercial transactions electronically on the Internet.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 7.
What is another name of C2B?
Answer:
C2B is also called as reverse auction model,

Question 8.
Expand C2BC.
Answer:
Consumer to Business to Consumer

Question 9.
Mention the two types of G2G systems.
Answer:
Internal facing,
External facing.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 10.
What is the objective of G2B?
Answer:
The objective of G2B is to reduce burdens on business.

Part B

Short Answers

Question 1.
What is mean by Brick and mortar?
Answer:
Brick and mortar is the term that refers to a business that has a physical store; the opposite of online store.

Question 2.
What is mean by Mobile Commerce?
Answer:
Mobile commerce Businesses that are conducted through the Internet using mobile phones or other wireless hand-held devices.

Question 3.
Write a note on Business to Consumer?
Answer:
Business to Consumer (B2C):
In B2C E-Commerce, commercial transactions take place between business firms and their consumers. It is the direct trade between companies and end-consumers via the Internet. B2C companies sell goods, information, or services to customers online in a more personalized dynamic environment and are considered as real competitor for a traditional storekeeper. An example of a B2C transaction is a book company selling books to customers. This mode is intended to benefit the consumer and can say B2C E-Commerce works as a retail store’ over the Internet.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Part C

Explain In Brief Answer

Question 1.
Write short notes on web1.0, web2.0, web3.0.
Answer:

  • Web 1.0 (Web of Content) ¡s the early web that contained text, images, and hyperlinks and allowed users only to search for information and read it. There was very little in the way of user interaction or content generation.
  • Web 2.0 (Web of Communication) ¡s a read-write web that allowed users to interact with each other.
  • Web 3.0 (Web of Context) is termed as the semantic web or executable web with dynamic applications, interactive services, and “machine-to-machine” interaction.

Question 2.
Write a note on E-business building block elements.
Answer:

  • E-Business is grounded on technologies such as Network Infrastructures (like the Internet, Intranet, Extranet)
  • Multimedia content &network publishing infrastructures (like HTML, Online Marketing)
  • Messaging and information distribution infrastructures (like EDI, e-mail, http,
    Computerized Inventory Management Systems) and
  • Other Common business service infrastructures (like electronic payments gateways, globalized Supply Chain Management (SCM), Online Transaction Processing).

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 3.
When a company is can be called E-business?
Answer:
A company can be called E-Business if and only if

  • It has the ability to conduct business electronically over the Internet.
  • It manages payment transactions through the Internet.
  • It has a platform for selling products &services via the Internet.

Part D

Explain In Detail

Question 1.
Explain the Benefits of E-commerce to a business organisation?
Answer:
The benefit of E-Commerce to a business organisation.

1. Access to Global Market:
The Internet spans the world of E-Commerce, and it is possible to trade with any business or a person who is connected with the Internet. It helps to access the global marketplace. Simple local businesses such as herbal product stores are able to market and sell their products internationally using E-Commerce. Thus, the whole world becomes a potential market for an E-Commerce company.

2. Lower Transaction Cost:
E-Commerce reduces the cost of business transactions substantially. For instance, a significant number of customer service representatives in a bank can be reduced by using net banking. Since these interactions are initiated by customers, the customers provide a lot of data for the transactions that may otherwise need to be entered by employees. This means that some of the work and costs are effectively shifted to customers; this is referred as customer outsourcing’.

3. 24×7 working:
A website is open all 24 hours, 7 days a week. As an E-Commerce firm can provide information about its products and services to customers around the clock, it can thus, take
orders, keep an eye on delivery of goods and receive payments at any time.

4. Low cost of entry:
Though E-Commerce was fist emerged in private networks it did not remain the same. The Internet has changed the face of E-Commerce. The Internet is all about democratization. Internet is a place where the small guy can effectively fight against the giants and hope to win. Days, when E-Commerce was only for affordable large national chains, are gone.
Today, it is common for retailers to move their traditional store to online with very little add-on only for building a good website.

5. Computer platform-independent:
Most computers have the ability to communicate via the Internet, irrespective of operating systems and hardware. Consumers need not have to upgrade their computers or network to participate in E-Commerce. They are not limited by existing hardware or software.

Also, the E-Commerce company need not worry about fast changes in computer network technology. E-Commerce applications can be more efficiently developed and distributed because they are platform-independent. Internet’s altruism helps E-Commerce.

6. Snapping middleman:
E-Commerce enjoys the benefit of bypassing middlemen and reaching the end customer directly through the Internet. In B2C E-Commerce business firms establish direct contact with their customers by eliminating middlemen. It helps to increase the sales of the organization without any interventions. This results in cheaper prices for consumers and higher
profit margins for the companies.

Samacheer Kalvi 12th Computer Applications Guide Chapter 15 E-Commerce

Question 2.
Explain various limitations of Ecommerce for a business organisation?
Answer:
1. People won’t buy all products online:
There are certain products like high price jewels, clothes or furnishings which people might not like to buy online. They might want to, inspect it, feel the texture of the fabric, etc. which are not possible in E-Commerce. As online shopping does not allow physical inspection, customers have to rely on electronic images of the products.

E-Commerce is an effective means for buying known and established services, that is, things that are being used every day. Example booking tickets, buying books, music CDs and software. It is not suitable for dealing with the new or unexpected. Traditional commerce always takes advantage when it is perishables and touches and feel products.

2. Competition and Corporate vulnerability:
Access to Global Market is beneficial on one hand but it also comes with competition. The open Internet has paved way for all business firms to operate in the global market. Many businesses have been already facing international competition from web-enabled business opponents.

The competitors may access product details, catalogs, and other information about a business through its website and make it vulnerable. They might then indulge in web harvesting. Web harvesting is the illegal activity of extracting business intelligence from a competitor’s web pages.

3. Security:
Security remains to be a problem for E-Commerce. Customers might be reluctant to give their credit card numbers to the website. As a lot of cyber frauds take place in E-Commerce transactions, people generally afraid to provide their personal information. Legal issues arise when the customer’s data falls into the hands of strangers. Fraudulent activities in traditional commerce is comparatively less as there is the personal interaction between the buyer and the seller.

4. Customer loyalty:
Businesses cannot survive long without loyal customers. The customers would like to buy from a website where they are able to get the best deal. They cannot be loyal to a particular seller. In traditional commerce, the shopkeeper would interact with the consumer “face-to-face” and gain their loyalty too.

In E-Commerce, the interaction between the business and the consumer is “screen-to-face”. The customers would feel that they do not have received sufficient personal attention. Since there is no personal touch in E-Business, companies could not win over their loyalty easily.

5. Shortage of skilled employees:
Though most of the process in E-Commerce is automated, some sectors like packaging and delivery need manual interventions. There could be problems related to shipping delays which would need technically qualified staff with an aptitude to resolve.

E-Commerce has difficulty in recruiting, training and retaining talented people. There is a great shortage of skilled employees. Traditional organizational structures and poor work cultures in some places inhibit the growth of E-Commerce.

6. Size and value of transactions:
The delivery cost of a pen surpasses the cost of the pen itself. E-Commerce is most often conducted using credit cards for payments, and as a result, very small and very large transactions tend not to be conducted online.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Tamilnadu State Board New Syllabus Samacheer Kalvi 12th Computer Applications Guide Pdf Chapter 16 Electronic Payment Systems Text Book Back Questions and Answers, Notes.

Tamilnadu Samacheer Kalvi 12th Computer Applications Solutions Chapter 16 Electronic Payment Systems

12th Computer Applications Guide Electronic Payment Systems Text Book Questions and Answers

Part I

Choose The Correct Answers

Question 1.
Based on the monetary value e payment system can be classified into
a) Mirco and Macro
b) Micro and Nano
c) Maximum and Minimum
d) Maximum and Macro
Answer:
a) Mirco and Macro

Question 2.
Which of the following is not a category of micro payment?
a) Buying a movie ticket
b) Subscription to e journals
c) Buying a laptop
d) Paying for smartphone app
Answer:
b) Subscription to e journals

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 3.
Assertion (A): Micro electronic payment systems support higher value payments.
Reason (R): Expensive cryptographic operations are included in macro payments
a) Both (A) and (R) are correct and (R) is the cor-rect explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
a) Both (A) and (R) are correct and (R) is the cor-rect explanation of (A)

Question 4.
Which of the following is correctly matched?
a) Credit Cards – pay before
b) Debit Cards – pay now
c) Stored Value Card – pay later
d) Smart card – pay anytime
Answer:
b) Debit Cards – pay now

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 5.
ECS stands for
a) Electronic Clearing Services
b) Electronic Cloning Services
c) Electronic Clearing Station
d) Electronic Cloning Station
Answer:
a) Electronic Clearing Services

Question 6.
Which of the following is not a Altcoin?
a) Litecoin
b) Namecoin
c) Ethereum
d) Bitcoin
Answer:
c) Ethereum

Question 7.
Which of the following is true about Virtual payment address (VPA)?
a) Customers can use their e-mailid as VPA
b) VPA does not includes numbers
c) VPA is a unique ID
d) Multiple bank accounts cannot have single VPA
Answer:
d) Multiple bank accounts cannot have single VPA

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 8.
Pick the odd one in the credit card transaction
a) card holder
b) merchant
c) marketing manager
d) acquirer
Answer:
a) card holder

Question 9.
Which of the following is true about debit card?
i. Debit cards cannot be used in ATMs
ii. Debit cards cannot be used in online transactions
iii. Debit cards do not need bank accounts
iv. Debit cards and credit cards are identical in physical properties
a) i, ii, iii
b) ii, iii, iv
c) iii alone
d) iv alone
Answer:
d) iv alone

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Match the following
List A List B
A1) First Digit B1) Account number
A2) 9th to 15th Digit B2) Mil Code
A3) First 6 Digits B3) BIN Code
A4) Last Digit B4) Check digit
Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems 1
Answer:
b) B2 B1 B3 B4

Part II

Short Answers

Question 1.
Define electronic payment system
Answer:
The term electronic payment refers to a payment made from one bank account to another bank account using electronic methods forgoing the direct intervention of bank employees.

Question 2.
Distinguish microelectronic payment and macro electronic payment
Answer:

Microelectronic payment

Macroelectronic payment

Online payment system designed to allow efficient and frequent payments of small amounts. Macro electronic payment systems support payments of higher value.
In order to keep transaction costs very low, the communica­tion and computational costs are minimized here. The security requirements are more rigorous in macro pay­ment systems because of huge money transactions.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 3.
List the types of microelectronic payments based on their algorithm
Answer:
Based on the algorithm used, it is classified into the following categories.

  1. Hash chain based micro electronic payment systems.
  2. Hash collisions and hash sequences based on micro electronic payment systems.
  3. Shared secrete keys based micro electronic payment systems.
  4. Probability-based micro electronic payment systems.

Question 4.
Explain the concept of an e-wallet
Answer:
Electronic wallets (e-wallets) or electronic purses allow users to make electronic transactions quickly and securely over the Internet through smartphones or computers.

Question 5.
What is a fork in cryptocurrency?
Answer:
Many cryptocurrencies operate on the basis of the same source code, in which the authors make only a few minor changes in parameters like time, date, distribution of blocks, number of coins, etc. These currencies are called as fork. In fork, both cryptocurrencies can share a common transaction history in block chain until the split.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Part III

Explain In Brief Answer

Question 1.
Define microelectronic payment and its role in E-Commerce.
Answer:
Definition:
Micro electric payment is an online payment system designed to allow efficient and frequent payments of small amounts.
Role in E-Commerce

  • An e-commerce payment system facilitates the acceptance of electronic payment for online transactions
  • E-commerce payment systems have become increasingly popular due to the widespread use of internet-based shopping and banking.

Question 2.
Compare and contrast the credit card and debit card. (3-5 points)
Answer:

Basis For Comparison Credit Card Debit Card
Meaning A credit card is issued by a bank or any fi­nancial institution to allow the holder of the card to purchase goods and services on credit. The payment is made by the bank on the customer’s behalf. A debit card is issued by a bank to allow its customers to purchase goods and services, whose payment is made directly through the custom­er’s account linked to the card.
Implies Pay later Pay now
Bank Account A bank account is not a prerequisite for issuing a credit card. A bank account is a must for issu­ing a debit card.
Limit The maximum limit of withdrawing money is determined according to the credit rating of the holder. The maximum limit of withdrawing money will be less than the money lying in the saving bank account.
Bill The holder of the card has to pay the credit card bill within 30 days of every month. There is no such bill, the amount is directly deducted from the custom­er’s account.
Interest Interest is charged when payment is not made to the bank within a specified time period. No interest is charged.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 3.
Explain briefly the Anatomy of a credit card.
Answer:
Publisher: Emblem of the issuing bank
Credit card number: The modem credit card number has a 16-digit unique identification number.

Question 4.
Briefly explain the stored value card and its types.
Answer:

  • A stored-value card is a type of debit card that is pre-loaded with a certain amount (value), with which a payment is made.
  • It is a card that has default monetary value on it.
  • The card may be disposed of when the value is used or recharged to use it again.
  • The major advantage of the stored-value card is that customers don’t need to have a bank account to get prepaid cards.
  • There are two varieties for the stored-value cards.

(i) Closed Loop

  • In closed-loop cards, money is metaphorically stored on the card in the form of binary-coded data.
  • Closed-loop cards are issued by a specific merchant or merchant and can only be used to make purchases from a specific place, e.g. Chennai metro rail travel card.

(ii) Open-loop (multipurpose)

  • Open-loop cards can be used to make debit transactions at a variety of retailers.
  • It is also called prepaid-debit cards.
  • It can be used anywhere the branded cards are accepted, e.g. Visa gift cards.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 5.
Write a note on mining in cryptocurrency.
Answer:
Mining:
The cryptocurrency units are created by the solution of cryptographic tasks called mining. The miners not only generate new monetary units but also initiate new transactions to the blockchain. As a reward, they will receive new Bitcoins.

Part IV

Explain In Detail

Question 1.
What is a credit card? Explain the key players of a credit card payment system and bring out the merits of it.
Answer:
Credit Card

  • A credit card is an electronic payment system normally used for retail transactions.
  • A credit card enables the bearer to buy goods or services from a vendor, based on the cardholder’s promise to the card issuer to pay back the value later with the agreed interest.

Key players in operations of credit card

1. Bearer:
The holder of the credit card account who is responsible for payment of invoices in full (transactor) or a portion of the balance (revolver) the rest accrues interest and carried forward.

2. Merchant:
Storekeeper or vendor who sells or providing service, receiving payment made by its customers through the credit card.

3. Acquirer:
Merchant’s bank that is responsible for receiving payment on behalf of merchant sends authorization requests to the issuing bank through the appropriate channels.

4. Credit Card Network:

  • It acts as the intermediate between the banks.
  • The Company is responsible for communicating the transaction between the acquirer and the credit card issuer.
  • These entities operate the networks that process credit card payments worldwide and levy interchange fees. E.g. Visa, MasterCard, Rupay

5. Issuer:
Bearer’s bank, that issue the credit card, set a limit of purchases, decides the approval of transactions, issue invoices for payment, charges the holders in case of default and offer card-linked products such as insurance, additional cards, and rewards plan.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 2.
Briefly explain Electronic Account transfer and its types.
Answer:
Electronic Account transfer

  • Apart from card-based payment systems, there are many alternative electronic payment systems.
  • With the advent of computers, network technologies, and electronic communications a large number of alternative electronic payment systems have emerged.

Types of Electronic Account transfer:

  1. ECS (Electronic Clearing Services)
  2. EFT(Electronic funds transfers)
  3. Real-Time Gross Settlement system (RTGS)

1. Electronic Clearing Services (ECS):
Electronic Clearing Service can be defined as a repeated transfer of funds from one bank account to multiple bank accounts or vice versa using computer and Internet technology.

2. Electronic Funds Transfer

  • Electronic Funds Transfer (EFT) is the “electronic transfer” of money over an online network.
  • The amount sent from the sender’s bank branch is credited to the receiver’s bank branch on the same day in batches.
  • Unlike traditional processes, EFT saves the effort of sending a demand draft through the post and the inherent delay in reaching the money to the receiver.
  • Banks may charge a commission for using this service.

3. Real Time Gross Settlement:

  • Real-Time Gross Settlement system (RTGS) is a payment system particularly used for the settlement of transactions between financial institutions, especially banks.
  • Real-time gross settlement transactions are:
  • Unconditional – the beneficiary will receive funds regardless of whether he fulfills his obligations to the buyer or whether he would deliver the goods or perform a service of a quality consistent with the order.
  • Irrevocable – a correctly processed transaction cannot be reversed and its money cannot get refunded.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 3.
Write a note on
a) Internet banking
b) Mobile Banking,
Answer:
(a) Internet banking:
Internet banking is a collective term for E-banking, online banking, virtual banking (operates only on the Internet with no physical branches), direct banks, web banking, and remote banking. Internet banking allows customers of a financial institution to conduct various financial transactions on a secure website operated by the banking institutions. This is a very fast and convenient way of performing any banking transactions.

It enables customers of a bank to conduct a wide range of financial transactions through its website. In fact, it is like a branch exclusively operating of an individual customer. The online banking system will typically connect to the core banking system operated by customers themselves (Self-service banking).

Advantages:

  1. The advantages of Internet banking are that the payments are made at the convenience of the account holder and are secured by user name and password, i.e. with Internet access it can be used from anywhere in the world and at any time.
  2. Any standard browser (e.g. Google Chrome) is adequate. Internet banking does not need .installing any additional software.

(b) Mobile banking:
Mobile banking is another form of net banking. The term mobile banking (also called m-banking) refers to the services provided by the bank to the customer to conduct banking transactions with the aid of mobile phones. These transactions include balance checking, account transfers, payments, purchases, etc.

Transactions can be done at any time and anywhere. The WAP protocol installed on a mobile phone qualifies the device through an appropriate application for mobile session establishment with the bank’s website. In this way, the user has the option of permanent control over the account and remote management of his own finances. Mobile Banking operations can be implemented in the following ways:

  • Contacting the call center.
  • Automatic IVR telephone service.
  • Using a mobile phone via SMS.
  • WAP technology.
  • Using smartphone applications.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 4.
What is cryptocurrency? Explain the same.
Answer:

  • A cryptocurrency is a unique virtual (digital) asset designed to work as a medium of exchange using a cryptographic algorithm.
  • This algorithm secures the transactions by recording them in blockchain and controls the creation of additional units of the currency.
  • Cryptocurrency is also called crypto coins, e-cash, alternative currencies, or virtual currencies and is classified as a subset of digital currencies.
  • Cryptocurrency can be defined as distributed accounting system based on cryptography, storing information about the state of ownership in conventional units.
  • The state of ownership of a cryptocurrency is related to individual system blocks called “portfolios”. Only the holder of the corresponding private key would have control over a given portfolio and it is impossible to issue the same unit twice.

Question 5.
Explain in detail the Unified payments interface
Answer:
(i) Unified Payments Interface (UPI) is a real-time payment system developed by the National Payments Corporation of India (NCPI) to facilitate inter-bank transactions.

(ii) It is simple, secure, and instant payment facility. This interface is regulated by the Reserve Bank of India and used for transferring funds instantly between two bank accounts through mobile (platform) devices. http://www. npci.org.in/

(iii) Unlike traditional e-wallets, which take a specified amount of money from the user and store it in its own account, UPI withdraws and deposits funds directly from the bank account whenever a transaction is requested.

(iv) It also provides the “peer-to-peer” collect request which can be scheduled and paid as per requirement and convenience.

(v) UPI is developed on the basis of Immediate Payment Service (IMPS). To initiate a transaction, UPI applications use two types of addresses – global and local.

  • The global address includes bank account numbers and IFSC.
  • Local address is a virtual payment address.

(vi) Virtual payment address (VPA) also called UPI-ID, is a unique ID similar to email id
(e.g. name@bankname) that enables us to send and receive money from multiple banks and prepaid payment issuers.

(vii) Bank or the financial institution allows the customer to generate VPA using a phone number associated with the Aadhaar number and bank account number. VPA replaces bank account details thereby completely hides critical information.

(Viii) The MPIN (Mobile banking Personal Identification Number) is required to confirm each payment. UPI allows operating multiple bank accounts in a single mobile application.

(ix) Some UPI application also allows customers to initiate the transaction using only Aadhaar number in absence VPA.

Advantages:

  1. Immediate money transfers through mobile devices round the clock 24 × 7.
  2. Can use a single mobile application for accessing multiple bank accounts.
  3. Single Click Authentication for transferring of the fund.
  4. It is not required to enter the details such as Card no, Account number, IFSC, etc. for every transaction.
  5. Electronic payments will become much easier without requiring a digital wallet or credit or debit card.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

12th Computer Applications Guide Electronic Payment Systems Additional Important Questions and Answers

Part A

Choose The Correct Answers

Question 1.
An electronic payment system is also called as …………………….
(a) liquidation
(b) clearing system
(c) clearing services
(d) all of these
Answer:
(d) all of these

Question 2.
The term credit card was first mentioned in ……………..
a) 1885
b) 1887
c) 1991
d) 1987
Answer:
b) 1887

Question 3.
I: Micro Electronic payments are expensive public-key cryptography.
II: Security of Micro Electronic Payment is low
(a) t-True, II-False
(b) I-False, II-True
(c) Both I, II are true
(d) Both I, II-False
Answer:
(b) I-False, II-True

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 4.
…………… is an Indian domestic open-loop card.
a) visa
b) Master
c) Rupay
d) Mastro
Answer:
c) Rupay

Question 5.
Rupaywas launched in
a) 2012
b) 2005
c)2017
d) 2019
Answer:
a) 2012

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 6.
How many card-based payment systems are available (based on the transaction settlement method)
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(b) 3

Question 7.
……………. is the first six digits of the credit card number to uniquely identify financial institutions.
a) BIN
b) UNF
c) CVC2
d) UDI
Answer:
a) BIN

Question 8.
……………………… is an electronic payment system normally used for retail transactions.
Answer:
Credit Card

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 9.
…………. is a type of fraud where the same cryptocurrency is spent in more than one transactions.
a) booting
b) Interpreting
c) Double spend
d) None of these
Answer:
c) Double spend

Question 10.
……………….. allow users to make electronic transactions quickly and Securely
a) E-banking
b) Net banking
c) E-wallets
d) None of these
Answer:
c) E-wallets

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 11.
The term credit card was first mentioned in the sci-fi normal in the year ………………………
(a) 1997
(b) 1887
(c) 1987
(d) 1897
Answer:
(b) 1887

Question 12.
………… is the activity of buying or selling commodities through online services or over the Internet.
a) Mobile Banking
b) Internet banking
c) Both A and B
d) None of these
Answer:
b) Internet banking

Assertion And Reason

Question 1.
Assertion (A): An Electronic payment system is a financial arrangement
Reason(R): K consists of an intermediator to facilitate the transfer of money-substitute between a payer and a receiver.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)

Question 2.
Assertion (A): Microelectronic Payment Systems is an online payment system designed to allow efficient and frequent payments of small amounts.
Reason(R): A payment system is an essential part of a company’s financial operations.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 3.
Assertion (A) Payment cards are plastic cards that enable cashless payments.
Reason(R): Payment cards do not contain a chip.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
c) (A) is true and (R) is false

Question 4.
Assertion (A): Credit card Allows purchases over the Internet installments.
Reason(R): credit cards are not accepted worldwide.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
c) (A) is true and (R) is false

Question 5.
Assertion (A): All Payment cards (including debit cards) are usually plastic cards of size.
Reason (R): It is of size 85.60 mm width x 53.98 mm height, rounded corners with a radius of 2.88 mm to 3.48 mm, and thickness of 0.76 mm.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 6.
Assertion (A): EMV chip is an integrated chip in addition to magnetic stripe to store cardholder’s information
Reason(R): CVC2 is used in contact transactions.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
c) (A) is true and (R) is false

Question 7.
Assertion (A): The RFID symbol is four curved lines radiating rightwards similar to a tilted Wi-Fi symbol.
Reason(R): RFID indicates that it is a contactless smartcard.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 8.
Assertion (A): Cryptocurrency is a unique virtual (digital) asset designed to work as a medium of exchange using a cryptographic algorithm
Reason(R): Cryptocurrency is also called as Bitcoins.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
c) (A) is true and (R) is false

Question 9.
Assertion (A): The bitcoin payment system, was developed in 2005
Reason(R): The function of cryptocurrency is based on technologies such as Mining, Blockchain, Directed Acyclic Graph, Distributed register (ledger).
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
d) (A) is false and (R) is true

Question 10.
Assertion (A): Unified Payments Interface (UP!) is a real-time payment system developed by the National Payments Corporation of India (NCPI)
Reason(R): URI to facilitate inter-bank transactions.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
Answer:
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Find The Odd One On The Following

1. (a) Paytm
(b) Bitcoin
(c) Amazon
(d) UPI
Answer:
(c) Amazon

2. (a) Customer
(b) Fund Transfer
(c) Service provider
(d) payment processor
Answer:
(b) Fund Transfer

3. (a) Hash chain
(b) Hash collision
(c) Hash secret
(d) Hash Sequences
Answer:
(c) Hash secret

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

4. (a) Bearer
(b) Provider
(c) Acquirer
(d) Merchant
Answer:
(b) Provider

5. (a) EFTPOS
(b) Offline debit
(c) Purush card system
(d) Authorization
Answer:
(d) Authorization

6. (a) ECS
(b) EFT
(c) GST
(d) RTGS
Answer:
(d) RTGS

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

7. (a) Crypto coins
(b) E-cash
(c) Virtual currencies
(d) Statistical Currencies
Answer:
(c) Virtu! currencies

8. (a) Mining
(b) Acyclic graphics
(c) ledger
(d) Debitor\Creditor
Answer:
(d) Debitor\Creditor

9.(a) Bitshares
(b) Master coin
(c) Trading
(d) WXT
Answer:
(c) Trading

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

10. (a). Paypal
(b) SBI Buddy
(c) Paytm
(d) Flipkart
Answer:
(d) Flipkart

Match The Following:

Question 1.
EFTPOS – Signature Debit
Offline Debit – PIN Debit
Closed Loop – Multi-Purpose
Open Loop – Single Purpose
Answers
1. PIN Debit table
2. Signature Debit
3. Single Purpose
4. Multi-Purpose

Question 2.
Hologram – Contactless Smart Card
RFID Symbol – Card Holder Information
EMV Chip – Emblem
Publisher – Prevents Duplication
Answers
1. card Holder Information
2. Emblem
3. prevents Duplication
4. contactless Smart Card

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Abbreviations:
1. UPI – Unified Payment Interface
2. MII – Major Industry Identifier
3. IIN – Issuer Identifier Number
4. BIN – Bank Identification Number
5. EMV – Europay, MasterCard, Visa
6. RFID –
7. CVV – Card Verification Code
8. ECS – Electronic Clearing Services
9. EFT – Electronic Fund Transfer
10 RTGS – Real Time Gross Settlement System
11. PoS – Point of Sale
12. NEFT – National Electronic Fund Transfer
13. RBI – Reserve Bank of India
14. IDRBT – Institute for Development and Research in Banking Technology
15. ICO – Initial Coin Offer
16. OTP – One-Time password
17. ACH – Automated Clearing House
18. NCPI – National Payment Corporation of India
19. IMPS – Immediate Payment Service
20. VPA – Virtual Payment Address
21. BHIM – Bharat Interface for Money
22. NPCI – National Payment Corporation of India

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Very Short Answers

Question 1.
What is the use of (POS) Point of Sale Terminal?
Answer:
It enables customers to make payments for the purchase of goods and services by means of credit and debit cards.

Question 2.
What are payment cards?
Answer:
Payment cards are plastic cards that enable cashless payments.

Question 3.
What are the two types of electronic payment systems?
Answer:
Microelectronic payment system and Macro electronic payment system

Question 4.
What are the three types of cards using for payment systems?
Answer:
Credit card, Debit card, Stored value card

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 5.
What are the two types of payment systems?
Answer:
Cash payment system and Non-cash payment system

Question 6.
What is a credit card payment system?
Answer:
A credit card is an electronic payment system normally used for retail transactions.

Question 7.
What is a debit card payment system?
Answer:
It is an electronic payment card where the transaction amount is deducted directly from the card holder’s bank account upon authorization.

Question 8.
What is a Magnetic stripe?
Answer:
It is an iron-based magnetic material containing encrypted data about the cardholder and account number.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 9.
What is an EMV chip?
Answer:
It is an integrated chip in addition to a magnetic stripe to store the card holder’s information.

Question 10.
What is Hologram?
Answer:
A hologram is a security feature that prevents duplication.

Question 11.
What is the use of real-time gross settlement?
Answer:
It is used for the settlement of transactions between financial institutions

Question 12.
What is Cryptocurrency?
Answer:
A cryptocurrency is a unique virtual asset designed to work as a medium of exchange.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 13.
What algorithm is used for Cryptocurrency?
Answer:
Cryptographic algorithm

Question 14.
What is Bitcoin?
Answer:
Bitcoin is the most popular and the first decentralized cryptocurrency

Question 15.
What is Altcoin?
Answer:
Altcoins is the collective name for all cryptocurrencies that appeared after Bitcoin.

Question 16.
What is Mining?
Answer:
The cryptocurrency units are created by the solution of cryptographic tasks called mining.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 17.
What is Blockchain?
Answer:
Blockchains are an open distributed book that records transactions of cryptocurrencies

Question 18.
What is the use electronic wallet?
Answer:
It is used to allow users to make electronic transactions quickly and securely over the Internet

Question 19.
What is another name of mobile banking?
Answer:
Net banking or m-banking

Question 20.
Who developed Unified Payments Interface (UPI)?
Answer:
National Payments Corporation of India (NCPI)

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Years To Remember

1887 The term credit card was first mentioned
1920 The modern credit cards concept was born in the U.S.A
2011 Altcoins Litecoin and Namecoin appeared
2013 Cryptocurrency platforms began
2014 2nd generation of cryptocurrency appeared

Part B

Short Answers

Question 1.
Write a note on payment cards?
Answer:
Payment cards are plastic cards that enable cashless payments. They are a simple embossed plastic card that authenticates the cardholder on behalf of a card issuing company, which allows the user to make use of various financial services.

Question 2.
Define liquidation or clearing system or clearing service.
Answer:

  • An Electronic payment system is a financial arrangement that consists of an intermediator to facilitate the transfer of money-substitute between a payer and a receiver.
  • It is known as liquidation, clearing system, or clearing service.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 3.
What is the role of the Electronic payment system?
Answer:
Electronic payment system ensures the transfer of value from one subject of the economy to another and plays an important role in modern monetary systems.

Question 4.
What are the two types of payment systems?
Answer:
Payment systems are generally classified into two types. They are

  1. Microelectronic Payment Systems
  2. Macro Electronic Payment Systems

Question 5.
Define COD?
Answer:
Cash on delivery (COD) also called a collection on delivery describes a mode of payment in which the payment is made only on receipt of goods rather than in advance.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 6.
List some popular macro on-line payment systems.
Answer:

  • Some popular macro on-line payment systems are
  • Card-based payment systems
  • Electronic account transfer
  • Electronic cash payment systems
  • Mobile payment systems and ¡nternetspayment systems

Question 7.
What are the three widely used card-based payment systems?
Answer:

  1. Credit card-based payment systems (pay later)
  2. Debit card-based payment systems (pay now)
  3. Stored value card-based payment systems (pay before)

Question 8.
What is mean by Credit Card?
Answer:

  • Credit card is an electronic payment system normally used for retail transactions.
  • A credit card enables the bearer to buy goods or services from a vendor, based on the cardholder’s promise to the card issuer to pay back the value later with the agreed interest.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 9.
How merchant will be one of the Key Players in the operations of credit cards?
Answer:
Storekeeper or vendor who sells or providing service, receiving payment made by its customers through the credit card.

Question 10.
How Acquirer will be one of the Key Players in the operations of credit cards?
Answer:
Merchant’s bank that is responsible for receiving payment on behalf of merchant sends authorization requests to the issuing bank through the appropriate channels.

Question 11.
What is mean by RFID symbol?
Answer:

  • RFID symbol is four curved lines radiating rightwards similar to a tilted Wi-Fi symbol.
  • It indicates that it is a contactless smartcard.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 12.
Define Hologram.
Answer:
A hologram is a security feature that prevents duplication. It is a 3-dimensional image formed by interference of light beams.

Question 13.
What is mean by CVC/CVV?
Answer:

  • CVV – Card Verification value
  • CVC – Card Verification code
  • It is a 3 digit code usually printed to the left of the signature pane that validates the card.

Question 14.
What is mean by Debit Card?
Answer:
Debit Card is an electronic payment card where the transaction amount is deducted directly from the card holder’s bank account upon authorization.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 15.
What is Smart card?
Answer:

  • A plastic card with a built-in microprocessor used typically to perform financial transactions.
  • The modern version of card-based payment is smart cards.
  • Smart card along with the regular features of any card-based payment system holds an EMV chip.

Question 16.
What are the two varieties for the stored-value cards?
Answer:
There are two varieties for the stored-value card.

  1. Closed-loop (single purpose)
  2. Open-loop (multipurpose)

Question 17.
List the advantages of smart card.
Answer:
The advantage of Smart cards is that it can

  • Provide Identification
  • Authentication
  • Data Storage
  • Application Processing.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 18.
What are the two types of smart card?
Answer:
Smart cards can be classified into

  1. Contact smart cards
  2. Contactless smart cards.

Question 19.
What is mean E-cash?
Answer:

  • Electronic cash is (E-Cash) is a currency that flows in the form of data.
  • It converts the cash value into a series of encrypted sequence numbers and uses these serial numbers to represent the market value of various currencies in reality.

Question 20.
List the advantages of Internet Banking.
Answer:

  • The advantages of Internet banking are that the payments are made at the convenience of the account holder and are secured by user name and password, i.e. with Internet access it can be used from anywhere in the world and at any time.
  • Any standard browser (e.g. Google Chrome) is adequate. Internet banking does not need installing any additional software.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Part C

Explain In Brief Answer

Question 1.
How will you do the Microelectronic payment transactions?
Answer:
In general, the parties involved in the micro on-line payments are the Customer, Service Provider, and Payment processor. The Microelectronic payment transactions can be explained in the following way.

  • Step 1: Customer proves his authentication and the payment processor issues micropayments.
  • Step 2: Customer pays the micropayments to the online service provider and gets the requested goods or services from them.
  • Step 3: Service provider deposits micro payments received from the customer to the payment processor and gets the money.

Question 2.
Write a short note on Real Time Gross Settlement?
Answer:

  • Real-Time Gross Settlement system (RTGS) is a payment system particularly used for the settlement of transactions between financial institutions, especially banks.
  • As the name indicates, RTGS transactions are processed in real-time.
  • RTGS payments are also called push payments that are initiated(“triggered”) by the payer.
  • RTGS payments are generally large-value payments, i.e. high-volume transactions.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 3.
Mention the advantages of a credit card?
Answer:
Advantages of credit card:

  1. Most credit cards are accepted worldwide.
  2. It is not necessary to pay physical money at the time of purchase. The customer gets an extra period to pay for the purchase.
  3. Depending on the card, there is no need to pay an annuity.
  4. Allows purchases over the Internet in installments.
  5. Some issuers allow “round up” the purchase price and pay the difference in cash to make the transactions easy.

Question 4.
What are three ways of processing debit card transactions?
Answer:
Three ways of processing debit card transactions are

  1. EFTPOS (also known as online debit or PIN debit)
  2. Offline debit (also known as signature debit)
  3. Electronic Purse Card System

Question 5.
Define
(i) Closed Loop
(ii) Open Loop
Answer:
(i) Closed Loop

  • In closed-loop cards, money is metaphorically stored on the card in the form of binary-coded data.
  • Closed-loop cards are issued by a specific merchant or merchant and can only be used to make purchases from specific places, e.g. Chennai metro rail travel cards.

(ii) Open loop (multipurpose)

  • Open-loop cards can be used to make debit transactions at a variety of retailers.
  • It is also called prepaid-debit cards.
  • It can be used anywhere the branded cards are accepted, e.g. Visa gift cards.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 6.
Give the two types of Real-time gross settlement transactions?
Answer:
Real-time gross settlement transactions are:
Unconditional – the beneficiary will receive funds regardless of whether he fulfills his obligations to the buyer or whether he would deliver the goods or perform a service of a quality consistent with the order.

Irrevocable – a correctly processed transaction cannot be reversed and its money cannot get refunded (the so-called settlement finality).

Part D

Explain In Detail

Question 1.
Explain Debit Card?
Answer:
Debit Card:
Debit Card is an electronic payment card where the transaction amount is deducted directly from the card holder’s bank account upon authorization.

Generally, debit cards function as ATM cards and act as a substitute for cash The way of using debit cards and credit cards is generally the same but unlike credit cards, payments using a debit card are immediately transferred from the cardholder’s designated bank account, instead of them paying the money back at a later with added interest. In the modern era, the use of debit cards has become so widespread.

The debit card and credit card are identical in their physical properties. It is difficult to differentiate two by their appearance unless they have the term credit or debit imprinted. Currently, there are three ways of processing debit card transactions:

  1. EFTPOS (also known as online debit or PIN debit)
  2. Offline debit (also known as signature debit)
  3. Electronic Purse Card System

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 2.
Explain in detail the Credit card Number.
Answer:

  • Credit card number: The modern credit card number has a 16-digit unique identification number.
  • The first digit of the credit card number is Major Industry Identifier (Mil).
    • It identifies the issuer category.
    • e.g. 1 – Airlines,4 – Banks
  • The next 5 digits uniquely identify the issuing organization.
  • The first 6 digits together called as Issuer Identifier Number (IIN) or Bank Identification Number (BIN).
  • The next 9 digits are the account number.
  • The last digit is a check digit (based to the Luhn algorithm).

Question 3.
Write in detail about the classification of smart cards
Answer:
(i) Contact smart cards

  • Contact smart cards have a contact area of approximately 1 square centimeter, comprising several gold-plated contact pads.
  • These pads provide electrical connectivity only when inserted into a reader, which is also used as a communications medium between the smart card and a host. e.g. a point of sale terminal(POS).

(ii) Contactless smart cards

  • Contactless smart card is empowered by RF induction technology.
  • Unlike contact smart cards, these cards require only near proximity to an antenna to communicate.
  • Smartcards, whether they are the contact or contactless cards do not have an internal power source.
  • Instead, they use an inductor to capture some of the interrupting radio-frequency signals, rectify it, and power the card’s processes.

Samacheer Kalvi 12th Computer Applications Guide Chapter 16 Electronic Payment Systems

Question 4.
Write the steps to transfer funds using Net Banking.
Answer:

  • Step 1; Login to net banking account using unique user name and password provided by the bank earlier.
  • Step 2: Add the beneficiary as a payee to enable transfer of fund. The following details like Account Number, Name, IFSC about the beneficiary are to be filled in the ‘Add New Payee’ section.
  • Step 3: Once the beneficiary Is added, choose RTGS / NEFT / IMPS as mode of Fund Transfer.
  • Step 4: Select the account to transfer money from, select the payee, enter the amount to be transferred and add remarks (optional).
  • Step 5: Click on submit.
  • Step 6: Enter the OTP received to mobile number linked to the corresponding account to complete the transaction.

Question 5.
Explain the advantages of UPI?
Answer:

  • Immediate money transfers through mobile device round the clock 24 × 7.
  • Can use single mobile application for accessing multiple bank accounts.
  • Single Click Authentication for transferring of fund.
  • It is not required to enter the details such as Card no, Account number, IFSC etc. for every transaction.
  • Electronic payments will become much easier without requiring a digital wallet or credit or debit card