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
Arrays and Structures
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.
Write a program to assign data to members of a structure variable and display the contents.
2.
Write a C++ program to access array elements using pointer with sample output.
3.
Write about initialization of 2-D array.
4.
Write a note on 2D array declaration.
5.
Write the syntax and an example for structure.
6.
In an array char str[5]={'A', 'B', 'C'}; what is the value of str[4]?
A
B
NULL
0
7.
The number of characters entered in an array char n[4] is _________.
4
3
5
more than 4
8.
Displaying all the elements in an array is an example of _________.
Object definition
Traversal
Overloading
functions
9.
Array index number always start from _________.
0
1
n
n-1
10.
The size of an array should be specified in _________.
<>
{}
()
[]
11.
Write about returning structures from functions.
12.
Write a C++ program to check palindrome or not using array
13.
How the members of the nested structures can be accessed?
14.
Write the syntax of creating a character array.
15.
What must be known to create any kind of array?
16.
Write output of the following program.
struct Student
{
int age;
float height, weight;
struct dob
{
int date;
char month[4];
int year;
};
}mahesh;
void main( )
{
cout < < " Enter the age:" < < endl;
cin > > mahesh.age;
cout < < "Enter the height:" < < endl;
cin> > mahesh.height;
cout < < "Enter the weight:" < < endl;
cin < < mahesh. weight;
cout < < "The Date of birth:" < < endl;
cout < < " Enter the day:" < < endl;
cin > > mahesh.dob.date;
cout < < "Enter the month:"«endl;
cin > > mahesh.dob.month;
cout < < "Enter the year:" < < endl;
cin > > mahesh.dob.year;
cout < < "The values entered for Age, height and weightare" < < endl;
cout-ccmahesh.age < < "\t" < < mahesh.height < < "\t" < < mahesh.weight < < endl;
cout < < "His date of Birth is:" < < endl < < mahesh.dob.date < < "-" < < mahesh.dob.
month < < "-" < < mahesh.dob.year;
}
17.
Explain memory representation of 2-D array.
18.
Write C++ program to show how the strucrures can be returned from a function.
19.
Write a C++ program to display the contents of the following structure definition.
1.
C++ Program that assigns data to members of a structure variable and displays the contents
include< iostream >
using namespace std;
struct Employee
{
char name[50];
int age;
float salary;
};
int main( )
{
Employee e1;
cout < < "Enter Full name:";
cin > > e1.name;
cout < < endl < < "Enter age:";
cin > >e1.age;
couts < < endl < < "Enter salary:";
cin-c-e1.salary; ,
cout < <"\nDisplaying Information." << endl;
cout< < "Name:" < < e1.name < < endl;
cout< < "Age:" < < e1.age < < endl:
cout < < "Salary:" < < e1.salary;
return 0;
}
Output:
Enter Full name:
Ezhil
Enter age:
27
Enter salary:
40000.00 .
Displaying Information.
Name: Ezhil
Age: 27
Salary: 40000.00
2.
#include< iostream >
using namespace std;
int main ( )
{
int data [5];
cout< < "Enter elements:";
for(int i = 0; i < 5; ++i)
cin > > data [i]; .
cout < < "You entered:";
for (int i = 0; i < 5; ++i)
cout < < endl < < *(data +i);
}
return 0;
Output:
Enter elements:
1
2
3
5
4
You entered:
1
2
3
5
4
3.
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.
4.
The 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: intA[3][4];
5.
struct structure_name {
type member_name1;
type mamber _name2;
} reference_name;
Example:
struct Student
{
long rollno;
int age;
float weight;
};
6.
(c)
NULL
7.
(b)
3
8.
(b)
Traversal
9.
(a)
0
10.
(d)
[]
11.
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 structure object represents the structure. Like a normal variable, structure variable(structure object) can be passed by value or by references / addresses. Similar to built-in data types, struc.tures also can be returned from a function.
12.
#include< iostream >
using namespace std;
int main( )
{
int i, j, len, flag =1;
char a [20];
cout < < "Enter a string:";
cin > > a;
for(len=0;a[len]!= '\0';++len)
for(!=0,j=len-1;i<len/2;++i,--j)
{
if(a[j]!=1[i])
flag=0;
}
if(flag==1)
cout< < "\n The String is palindrome";
else
cout< < "\n The String is not palindrome";
return 0;
}
Output:
Enter a string: madam
The String is palindrome
13.
The nested structures act as members of another structure and the members' of the child structure can be accesed as parent structure name. Child structure name. Member name.
14.
Syntax Array declaration is:
char array _name[ size];
15.
To create any kind of array, the size (length) of the array must be known in advance, so that the memory location 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.
16.
Output:
Enter the age:
18
Enter the height:
160.5
Enter the weight:
46.5
The Date of birth
Enter the day:
25
Enter the month:
NOV
Enter the year:
2017
The values entered for Age, height and weight are
18 160.5 46.5
His date of Birth is:
25-NOV-2017
17.
Normally, the two-dimensional array can be viewed as a matrix. The conceptual view of a 2-D array is shown below:
int A[4][3];
| A[0][0] | A[0][1] | A[0][2] |
| A[1][0] | A[1][1] | A[1][2] |
| A[2][0] | A[2][1] | A[2][2] |
| A[3][0] | A[3][1] | A[3][2] |
In the above example, the 2-D array name A has 4 rows and 3 columns.
Like one-dimensional, the 2-D array elements are stored in continuous memory.
There are two types of 2-D array memory representations. They are:
1. Row-Major order
2. Column-Major order
For example
int A[4)[3]={
{ 8,6,5},
{ 2,1,9},
{3,6,4},
{4,3,2},
18.
#include < iostream.h
using namespace std;
struct Employee
{
int Id;
char Name[25];
int Age;
long Salary;
};
Employee Inpt();
void main()
{
Employee e;
Emp = Input();
cout << "The values Entered are' << end1:
cout << n\n\nEmployee Idr' << e.Id;
cout << "\nEmployee Name:"<< e.Name;
cout << "\nEmployee Age.<< e.Age;
cout << n\nEmployee Salary:" << e.Salary;
}
Employee Input()
}
Employee e;
cout << n\nEnter Employee Id:";
cint >> e.Id;
cout << "\nEnter Employee Name:";
cin >> e.Name;
cout << "\nEnter Employee Age:";
circ >> e.Age;
cout << n\nEnter Employee Salary:";
cin >> e.Salary;
return;
}
19.
Struct Employee { char name[50]; int age; float salary};
#include < iostream >
using namespace std;
struct Employee
{
char name[50];
int age;
float salary;
};
int maim)
{
Employee e1;
cout' << "Enter Full name: ";
cin >> e1.name;
cout << ccend1 << x'Bnter age: ";
cin >> e1.age;
cout << ccend1' << "Enter salary: ";
cin >> e1.salary;
cout << "\nDisplaying Information." .
<< end1;
,cout << "Name: n << e1.name << end1;
cout << "Age: " << e1.age << end1:
cout << "Salary: " << e1.salary;
return 0;
}
Output:
Enter Full name: Ezhil
Enter age: 27
Enter salary: 40000.00
Displaying Iriformation.
Name: Ezhil
Age: 27
Salary: 40000.00
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