Tamil Nadu Board of Secondary EducationHSC Science Class 11

# Tamil Nadu Board Samacheer Kalvi solutions for Class 11th Computer Science Answers Guide chapter 12 - Arrays and Structures [Latest edition]

## Solutions for Chapter 12: Arrays and Structures

Below listed, you can find solutions for Chapter 12 of Tamil Nadu Board of Secondary Education Tamil Nadu Board Samacheer Kalvi for Class 11th Computer Science Answers Guide.

Evaluation - Section - AEvaluation - Section - BEvaluation - Section - CEvaluation - Section - D
Evaluation - Section - A [Pages 223 - 224]

### Tamil Nadu Board Samacheer Kalvi solutions for Class 11th Computer Science Answers Guide Chapter 12 Arrays and Structures Evaluation - Section - A [Pages 223 - 224]

Evaluation - Section - A | Q 1. | Page 223

Which of the following is the collection of variables of the same type that a referenced by a common name?

• int

• float

• Array

• class

Evaluation - Section - A | Q 2. | Page 223

int age[] = {6,90,20,18,2}; How many elements are there in this array?

• 2

• 5

• 6

• 4

Evaluation - Section - A | Q 3. | Page 223

cin>>n[3]; To which element does this statement accept the value?

• 2

• 3

• 4

• 5

Evaluation - Section - A | Q 4. | Page 223

By default, a string ends with which character?

• \o

• \t

• \n

• \b

Evaluation - Section - A | Q 5. | Page 223

Structure definition is terminated by ______

• :

• }

• ;

• ::

Evaluation - Section - A | Q 6. | Page 223

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

Evaluation - Section - A | Q 7. | Page 223

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.

• Time. seconds

• Time::seconds

• seconds

• t. seconds

Evaluation - Section - A | Q 8. | Page 223

Which of the following is a properly defined structure?

• struct {int num;}

• struct sum {int num;}

• struct sum int sum;

• struct sum {int num;};

Evaluation - Section - A | Q 9. | Page 224

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.

• cout<<e[0].empno<<e[0].ename;

• cout<<e[0].empno<<ename;

• cout<<e[0]->empno<<e[0]->ename;

• cout<<e.empno<<e.ename;

Evaluation - Section - A | Q 10. | Page 224

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

Evaluation - Section - B [Page 224]

### Tamil Nadu Board Samacheer Kalvi solutions for Class 11th Computer Science Answers Guide Chapter 12 Arrays and Structures Evaluation - Section - B [Page 224]

Evaluation - Section - B | Q 1. | Page 224

What is Traversal in an Array?

Evaluation - Section - B | Q 2. | Page 224

What is Strings?

Evaluation - Section - B | Q 3. | Page 224

What is the syntax to declare two – dimensional array.

Evaluation - Section - B | Q 4. | Page 224

Define structure. What is its use?

Evaluation - Section - B | Q 5. | Page 224

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

Evaluation - Section - C [Pages 224 - 225]

### Tamil Nadu Board Samacheer Kalvi solutions for Class 11th Computer Science Answers Guide Chapter 12 Arrays and Structures Evaluation - Section - C [Pages 224 - 225]

Evaluation - Section - C | Q 1. | Page 224

Define an Array?

Evaluation - Section - C | Q 1. | Page 224

What are the types of Array?

Evaluation - Section - C | Q 2. | Page 224

Write note on Array of strings.

Evaluation - Section - C | Q 3. | Page 224

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;
}

Evaluation - Section - C | Q 4. | Page 225

How to access members of a structure? Give example.

Evaluation - Section - C | Q 5. | Page 225

What is called anonymous structure? Give an example?

Evaluation - Section - D [Pages 225 - 226]

### Tamil Nadu Board Samacheer Kalvi solutions for Class 11th Computer Science Answers Guide Chapter 12 Arrays and Structures Evaluation - Section - D [Pages 225 - 226]

#### Explain in detail

Evaluation - Section - D | Q 1. | Page 225

Write a C++ program to find the difference between two matrices.

Evaluation - Section - D | Q 2. | Page 225

Write a C++ program to add two distances using the following structure definition.

struct Distance{
int feet;
float inch;
}d1, d2, sum;

Evaluation - Section - D | Q 3. | Page 225

Write the output of the following c++ program.

#include<iostream>
#include<stdio>
#include<string>
#include<conio>
using namespace std;
struct books {
char name[20], author[20];
} a[2];
int main()
{ 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<< "Book Name :"<<strcpy(a[1].name,"C++programming" )<<endl; cout<< "Book Author :"<<strcpy(a[1].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;
}

Evaluation - Section - D | Q 4. | Page 226

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;
|

Evaluation - Section - D | Q 5. | Page 226

Debug the error in the following program.

#include<istream.h>
structPersonRec
{
charlastName[10];
chaefirstName[10];
int age;
}
PersonRecPeopleArrayType[10];
void main()
{
PersonRecord people;
for (i = 0; i < 10; i++)
{
cout<<people.firstName<< ‘ ‘ <<people.lastName <<people.age;
}
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>> people[i].age;}
}

## Solutions for Chapter 12: Arrays and Structures

Evaluation - Section - AEvaluation - Section - BEvaluation - Section - CEvaluation - Section - D

## Tamil Nadu Board Samacheer Kalvi solutions for Class 11th Computer Science Answers Guide chapter 12 - Arrays and Structures

Shaalaa.com has the Tamil Nadu Board of Secondary Education Mathematics Class 11th Computer Science Answers Guide Tamil Nadu Board of Secondary Education solutions in a manner that help students grasp basic concepts better and faster. The detailed, step-by-step solutions will help you understand the concepts better and clarify any confusion. Tamil Nadu Board Samacheer Kalvi solutions for Mathematics Class 11th Computer Science Answers Guide Tamil Nadu Board of Secondary Education 12 (Arrays and Structures) include all questions with answers and detailed explanations. This will clear students' doubts about questions and improve their application skills while preparing for board exams.

Further, we at Shaalaa.com provide such solutions so students can prepare for written exams. Tamil Nadu Board Samacheer Kalvi textbook solutions can be a core help for self-study and provide excellent self-help guidance for students.

Concepts covered in Class 11th Computer Science Answers Guide chapter 12 Arrays and Structures are Introduction to Arrays and Structures, Types of Arrays, Two-dimensional Array, Array of Strings, Structures Introduction.

Using Tamil Nadu Board Samacheer Kalvi Class 11th Computer Science Answers Guide solutions Arrays and Structures exercise by students is an easy way to prepare for the exams, as they involve solutions arranged chapter-wise and also page-wise. The questions involved in Tamil Nadu Board Samacheer Kalvi Solutions are essential questions that can be asked in the final exam. Maximum Tamil Nadu Board of Secondary Education Class 11th Computer Science Answers Guide students prefer Tamil Nadu Board Samacheer Kalvi Textbook Solutions to score more in exams.

Get the free view of Chapter 12, Arrays and Structures Class 11th Computer Science Answers Guide additional questions for Mathematics Class 11th Computer Science Answers Guide Tamil Nadu Board of Secondary Education, and you can use Shaalaa.com to keep it handy for your exam preparation.