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: 01/10/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 the syntax of creating a character array.
2.
What is subscript of an array?
3.
Differentiate array and structure.
4.
Write a structure definition for the structure student containing examno, name and an array for storing five subject marks.
5.
To store 100 integer number which of the following is good to use?
Array or Structure
State the reason.
6.
Define structure .What is its use?
7.
What is Strings?
8.
What is called anonymous structure. Give an example
9.
Write the syntax and an example for structure.
10.
The following code sums up the total of all students name starting with ‘S’ and display it.Fill in the blanks with required statements.
struct student {int exam no,lang,eng,phy,che,mat,csc,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;
}
11.
Write a C++ program to accept and print your name?
12.
Define an Array? What are the types?
13.
Write the output of the following c++ program
#include <iostream>
#include <string>
using namespace std;
struct student
{
introll_no;
char name[10];
long phone_number;
};
int main(){
student p1 = {1,"Brown",123443},p2;
p2.roll_no = 2;
strcpy(p2.name ,"Sam");
p2.phone_number = 1234567822;
cout<< "First Student" <<endl;
cout<< "roll no : " << p1.roll_no <<endl<< "name : " << p1.name <<endl;
cout<< "phone no : " << p1.phone_number <<endl;
cout<< "Second Student" <<endl;
cout<< "roll no : " << p2.roll_no <<endl<< "name : " << p2.name <<endl;
cout<< "phone no : " << p2.phone_number <<endl;
return 0;
}
14.
Write a C++ Program to Add two Complex Numbers by Passing Structure to a Function for the following structure definition
struct complex
{
float real;
float imag;
};
The prototype of the function is complex add Complex Numbers(complex, complex);
15.
Explain call by value with respect to structure.
16.
How many types of arrays in C++?
2
3
4
many
17.
When accessing a structure member, the identifier to the left of the dot operator is the name of
structure variable
structure tag
structure member
structure function
18.
What will be the output of this program?
#include< iostream >
using namespace std;
struct ShoeType
{
string name;
double price; .
};
int main ()
{
Shoe Type shoe 1, shoe2;
shoe 1.name = "Adidas";
shoe 1.price = 9.99;
cout <
shoe2.price = shoe2.price / 9;
cout << shoe2.name << "#"<
Adidas # 9.99
Adidas # 1.11
Adidas # 9.99
Adidas # 9.11
Adidas # 9.99
Adidas # 11.11
Adidas # 9.11
Adidas # 11.11
19.
What will happen when the structure is declared?
it will not allocate any memory
it will allocate the memory
it will be declared and initialized
it will be only declared
20.
The data elements in the structure are also known as _________.
objects
members
data
records
21.
Which of the following is the collection of variables of the same type that an referenced by a common name?
int
float
Array
class
1.
Syntax Array declaration is:
char array _name[ size];
2.
In an array each element (Memorty box) has a unique index number starting from 0 which is known as "subscript".
3.
| Array | Structure |
| It is a collection of variables of same datatype referenced by a common name. | It is a collection of variables of different datatype referenced by a common name. |
4.
struct student
{
int exam no;
char name[50];
int marks[5];
};
5.
Array is good to use.
Reasons:
(i) All 100 numbers are integer type.
(ii) Array index helps to access the numbers quickly.
6.
Structure is a user-defined which has the combination of data items with different data types. This allows to group of variables of mixed data types together into a single unit. 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.
7.
A string is defined as a sequence of characters where each character may be a letter, number or a symbol. Each element occupies one byte of memory. Every string is terminated by a null ('\0', ASCII code 0) character which must be appended at the end of the string.
8.
A structure without a name/tag is called anonymous structure.
struct
{
long rollno;
int age;
float weight;
} student;
The student can be referred as reference name to the above structure and the elements can be accessed like student.rollno, student.age and student.weight .
9.
struct structure_name {
type member_name1;
type mamber _name2;
} reference_name;
Example:
struct Student
{
long rollno;
int age;
float weight;
};
10.
}
struct student
int exam_no, lang, eng, phy, chem, mat, csc, total;
char name [15];
}
int main()
{
students [20];
for (int i = 0; i <20; i++)
{
cout<<"\n Enter the exam number of student:"";
cin>> s[i].exam_no.;
cout << "\n Enter language names:";
ein>>s[i].lang;
cout<<"Enter name of the Student:"";
cin>>s[i].Name;
}
for (int i=0; i<20; i++)
{
if (s[i],name[0] == 's')
{
cout << "Exam number:" << s[i].name;
cout << "Student Exam number";
}
}
return 0;}
11.
#include< iostream >
using namespace std;
int main()
{
char name[20];
cout << "Enter your name'' << endl;
cin.get(name,20);
cout << "Your name:" << name«endl;
return 0;
}
output:
Enter your name : xxxx xxxx
Your name: xxxx xxxx
12.
"An array is a collection of variables of the same type that are referenced by a common name".
An array is also a derived datatype in C++.
There are different types of arrays used in C++. They are:
1. One-dimensional arrays
2. Two-dimensional arrays
3. Multi-dimensional arrays
13.
Output:
First Student roll no: 1
name: Brown
phone no: 123443
Second Student roll no: 2
name: Sam
Phone no : 1234567822
Third Student roll no: 3
name :Addy
Phone no : 1234567844
14.
#include< iostream >
using namespace std;
struct complex
{
float real;
float imag;
} complexNumber;
complex Number add Complex Number(complex,
complex);
int main()
{
complexNumber
c1,c2, temp;
char simag;
cout << "Enter the value of A and B where A+iB is first complex number'' << xendl;
cin >> c1.real >> c1.imag;
cout << "Enter the value of A and B where A+iB is second complex number'' << endl;
cin >> c2.real >> c2.imag
simag=(temp.imag>0)?'+' : '-';
temp.imag=(tem.imag>0) >? temp.imag :-temp.
img;
temp = addcomplexNumber( c1, c2);
cout << "sum=" << temp.real << temp.imag << "i";
return 0;
}
complex Number add Complex Numbers(Complex
c1, Complex c2)
{
complex t;
t.real = c1.real + c2.real;
t.imag = c1.imag + c2.imag;
return(t);
}
15.
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 effect the structure variable used as an argument.
Consider this example:
#include< iostream >
useing 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 ();
}
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
16.
(a)
2
17.
(a)
structure variable
18.
(a)
Adidas # 9.99
Adidas # 1.11
19.
(a)
it will not allocate any memory
20.
(b)
members
21.
(c)
Array
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