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: 13/05/2022
QB365 provides detailed and simple solution for every Creative Questions in class 11 Computer Science Subject. It will helps to get more idea about question pattern in every Creative questions with solution.
latest Creative QuestionsDownload 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.
Write the output of the following program
#include < iostream >
using namespcae std;
class simple
{
private:
int a,b;
public:
simple( )
{
a=0;
b=0;
cout << "\n Constructor of class-simple";
}
void getdata( )
{
cout << "\nEnter value for a and b (sample data 6 and 7)...";
cin >> a >> b;
}
void putdata( )
{
cout << "\nThe two integers are ... " << a << 't\' << b << endl;
cout << "\nThe sum of the variables" << a << " + " << b << "=" << a+b;
}
};
int main ( )
{
simple s;
s.getdata( );
s.putdata( );
return 0;
}
2.
What is containership write a C++ program to illustrate the containership
3.
Explain how the objects can be passed in pass by value method.
4.
Write a C++ program to find square and cube of a number showing the use of nesting of members functions.
5.
Explain the different methods of creating an object in C++.
1.
Output:
Constructor of class-simple
Enter values for a and b (sample data 6 and 7)...6 7
The two integers are ...6 7
The sum of the variables 6 + 7 = 13
2.
Whenever an object of a class is declared as a member of another class it is known as a container class. In the container-ship the object of one class is declared in another class.
Illustration: C++ program to illustrate the containership
#include < iostream >
using namespace std;
class outer
{
int date;
public:
void get ( );
};
class inner
{
int value;
outer ot;
//object ot of class outer is declared in
class inner
public;
void getdata( );
};
void outer::get( )
{
cout << "\nEnter a value";
cin >> data;
cout << "\nThe given value is" << data;
}
void inner:: getdata( )
{
cout << "\nEnter a value";
cin >> value;
cout << "\nThe given value is " << value;
ot.get( ); //calling of get( ) of class outer in getdata( )of class inner
}
int main ( )
{
inner in;
in.getdata( );
return( );
}
Output:
Enter a value 10
To given value is 10
Enter a value 20
The given value is 20
3.
When an object is passed by value the function creates its own copy of the object and works on it. Therefore any changes made to the object inside the function do not affect the original object.
C++ program to illustrate how the pass by value method work.
#include < iostream >
using namespace std;
class Sample
{
private:
int num;
public:
void set(int x)
{
num = x;
}
void pass(Sample obj 1, Sample obj 2)
{
obj 1.num= 100;
obj 2.num=200;
cout << "\n\n Changed value of object1 "<< obj 1.num;
cout << "\n\n Changed value of object1 "<< obj 2.num;
}
void print ( )
{
cout << num;
}
};
int main ( )
{
Sample s1;
Sample s2;
Sample s3;
s1.set(10);
s2.set(20);
cout << "\n\t\tExample program for pass by value \n\n\n";
cout << "\n\n Value of object1 before passing;s1.print( );
cout << "\n\n Value of object2 before passing";
s2.print( );
s3.pass(s1,s2);
cout << "\n\n Value of object1 after passing";
s1.print( );
cout << "\n\n Value of object2 after passing";
s2.print ( );
return ( );
}
Output:
Example program for PASS BY VALUE
Value of object 1before passing 10
Value of object 2 before passing 20
Changed value of object 1 100
Changed value of object 200
Value of object 1 after passing 10
Value of object 1 after passing 20
4.
#include < iostream >
using namespace std
class nest
{
int a;
int square _num( )
{
return a* a;
{
}
public;
void input_ num( )
{
cout << "\nEnter a number";
cin >> a;
}
int cube_num( )
{
retun a* a*a;
void disp_num( )
{
int sq=square_num( ); //nesting of member function
int cu=cube_num( ); //nesting of member function
cout <<"\n The square of" << a << "is" << sq;
cout << "\nThe cube of" << a << "is" << cu;
}
};
int main( )
{
nest n1;
n1.input_ num( );
n1.disp _num( );
return 0;
}
Output:
Enter a number 5
The square of 5 is 25
The cube of 5 is 125
5.
Objects can be created in two methods:
i. Global object,
ii. Local object
(i) Global Object:
If an object is declared outside all the function bodies or by placing their names immediately after the closing brace of the class declaration then it is called as Global object. These objects can be used by any function in the program.
(ii) Local Object:
If an object is declared with in a function then it is called local object. It cannot be accessed from outside the function.
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