11th Standard Syllabus & Materials
11th Standard
TN 11th Tamil இயற்கை வேளாண்மை,சுற்றுச்சூழல் -செய்யுள் - மனோன்மணீயம் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil என்னுயிர் என்பேன் -துணைப்பாடம் - இசைத்தமிழர் இருவர் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மொழி கலை -செய்யுள் - ஒவ்வொரு புல்லையும் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - இலக்கணம் - பகுபத உறுப்புகள் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - துணைப்பாடம் - வாடிவாசல் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - செய்யுள் - குறுந்தொகை Important Questions And Answers Study Material - QB365 Set A

Published on: 14/12/2019
Polymorphism
Download Tamil Nadu 11th Standard Computer Science question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Science Test

1.
What is function signature?
2.
What is the output of the following program:
#inclue
using namespace std;
void print(int i)
void print(double f)
{cout << '' It is fioat" << f << endl;}
void print(string c)
{cout << '' it is string'' << c << endl;}
int main 0 {
print(10);
print(10.10);
print("Ten ");
return 0;
}
3.
class sale ( int cost, discount ;public: sale(sale &); Write a non inline definition for constructor specified;
4.
Discuss the benefits of constructor overloading?
5.
How does a compiler decide as to which function should be invoked when there are many functions? Give an example.
6.
Write a program to find the area of a rectangle using constructor overloading in a class.
7.
Give the output of the following program.
8.
Write a C++ program to concatenate two strings using operator overloading.
9.
Write the output of the following program
include < iostream >
using namespace std;
class Seminar
{
int Time;
public:
Seminar()
{
Time=30;cout << "Seminar starts now"<
void Lecture()
{
cout << "Lectures in the seminar on"<
Seminar(int Duration)
{
Time=Duration;cout << "Welcome to Seminar "<<endl; }
Seminar(Seminar &D)
{
Time=D.Time;cout << "Recap of Previous Seminar Content "<<endl; }
~Seminar()
{
cout << "Vote of thanks"<
};
int main()
{
Seminar s1,s2(2),s3(s2);
s1.Lecture();
return 0;
}
10.
Which of the following not considered in overloading?
Default argument
return type
constructor
furictions
a and b.
11.
The process of selecting the most appropriate overloaded function or operator is called ________.
overloaded function
function's signature
function's prototype
overload resolution
12.
The number and types of a function's parameter are called ________.
overload resolution
overloaded function
function's signature
function's prototype
13.
In C++, Polymorphism is achieved through ________.
abstraction
Data hiding
overloading
Data binding
14.
Which of the following is the ability of a message to be displayed in more than one form?
Polymorphism
Encapsulation
Abstraction
Inheritance
15.
Give the syntax for operator overloading.
16.
When the two function can not be overloaded?
17.
What is functions signature?
18.
How polymorphism achieved in C++?
19.
What is overloaded function?
1.
The ability of the function to process the message or data in more than one form is called as function overloading. It implies that two or more functions in the same scope share the same name but their parameters are different. In this situation, the functions that share the same name are said to be overloaded and the process is called function overloading. The number and types of a function's parameters are called the function's signature.
2.
Output:
it is integer 10
it is float 10.1
it is string Ten
3.
class sale
{
int cost, discount;
public:
sale (sale&);
};
// non inline constructor
sale: : sale(sale&s)
{
cost = s.cost;
discount = s.discount;
}
4.
Function overloading can be applied for constructors, as constructors are special functions of classes. A class can have more than one constructor with different signature. Constructor overloading provides flexibility of creating multiple type of objects for a class.
1. Memory is allocated for the objects.
2. Initialisation for the objects.
5.
When you call an overloaded function (when there are many functions with same name), the compiler determines the most appropriate definition to use by comparing the argument types used to call the function with the parameter types specified in the definitions. The process of selecting the most appropriate overloaded function or operator is called overload resolution.
Example:
#include <iostream>
using namespace std;
void print (int i)
{
cout<<"It is integer" <<i<< endl;
}
void print (string c)
{
cout<<"It is string"<<e << endl;
}
int main()
{
print (10);
print ("Good");
return 0;
}
Output
It is integer 10
It is string Good
6.
#include < iostream >
using namespace std;
class Area
{
int 1, b, a;
public:
area( );
area(int);
area(int, int);
area(area&);
void calculate ( )
};
area: .area ( )
{
cout < < "\n Enter the value of length and breath";
cin > > 1 > > b;
cout < < "\n\n non parameterized constructor";
}
area :: area (int c)
{
1=b=c;
cout < < "\n\n non parameterized constructor with one argument";
}
area ::area(int 11, int b 1)
{
cout < < "\n\n Non parameterized constructor with two argument";
1=11;
b=b1
}
area :: area(area & a)
{
=a1;
1= a.b;
cout < < "\n\n copy constructor";
}
void area::calculate ( )
{
a = 1*b;
cout < < a;
}
int main ( )
{
area obj;
cout < < "\n area of Rectangle is";
obj.calculate ( )
area obj1(2);
cout < < "\n area of Rectangle";
obj 1.calculatet);
area obj2 (2,3);
cout < < "\n area of Rectangle";
obj2.calculatet);
area obj3 (obj2); .
cout < < "\n area of Rectangle";
obj3.calculate ( );
return 0;
}
Output:
Enter the value of length and breadth 10 20
Non parameterized constructor area of Rectangle is 60
Parameterized constructor with one argument area of Rectangle 8
Parameterized constructor with two argument area of Rectangle 10
copy constructor area of Rectangle 10
7.
#include < bit sf std C++.h >
using namespace std;
class Greeks
{
Public:
void func(int x)
{
cout < < "value of';
}
void func(double x)
{
cout < < "value of';
}
void func(int X, int)
{
cout < < "value of';
}
};
int inain ( )
{
Greeks obj 1;
obj 1.func(7);
obj 1.func(9 .132);
obj 1.func(85, 64);
return 0;
}
Output
value of x is 7
value of x is 9.132
value of x and y is 85, 64
8.
#include< string.h >
#include< iostram >
using namespace std;
class strings
{
public:
char s[20];
void getstring( char str[])
{
strcpy(s,str);
}
void operator+(strings);
};
void strings::operator+(strings ob)
{
strcat(s,ob.s);
cout << "\nConcatnated String is:"<< s;
}
intmain()
{
strings ob 1, ob2;
char string 1 [10], string2[10];
cout << "\nEnter First String:";
cin>>string 1 ;
ob1.getstring(string 1);
cout << "\nEnter Second String:";
cin>>sting 2;
ob2.getstring(string2);
//Calling + operator to Join/Concatenate strings
obl +ob2;
return 0;
}
Output:
Enter First String:COMPUTER
Enter Second String:SCIENCE
Concatenated String is:COMPUTERSCIENCE
9.
Output
Seminar starts now
Welcome to seminar
Recap of previous seminar content
Lectures in the seminar on
Vote of thanks
Vote of thanks
Vote of thanks
10.
(a)
Default argument
11.
(d)
overload resolution
12.
(c)
function's signature
13.
(c)
overloading
14.
(a)
Polymorphism
15.
ReturnType classname :: Operator Operator Symbol (argument list)
{
\\ Function body
}
Example: Deposit Deposit: : operator + (Deposit d1);
16.
Two function cannot be overloaded when the only difference is that one takes a reference parameter and the other takes a normal, call-by-value parameter.
17.
The number and types of a function's parameters are called the function's signature.
18.
C++ polymorphism is achieved through function overloading and operator overloading.
19.
An overloaded function refers to a function having more than one distinct meaning.
11th Standard Syllabus & Materials
11th Standard
TN 11th Tamil பீடு பெற நில் - செய்யுள் - காவடிச்சிந்து Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - உரைநடை - மலை இடப்பெயர்கள் : ஓர் ஆய்வு Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மாமழை போற்றுதும் - துணைப்பாடம் - யானை டாக்டர் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மாமழை போற்றுதும் - செய்யுள் - ஐங்குறுநூறு Important Questions And Answers Study Material - QB365 Set A
Tamilnadu Stateboard 11th Standard Subjects

Maths

Commerce

Economics

Biology

Business Maths and Statistics

Accountancy

Computer Science

Physics

Chemistry

Maths

Biology

Economics

Physics

Chemistry

History

Business Maths and Statistics

Computer Science

Accountancy

Computer Applications

History

Computer Technology

Commerce

Computer Applications

Computer Technology

Tamil

English

French
Tamilnadu Stateboard Standards