Sunday 05th May 2024
REGISTRATION
Online Fashion Store

CBSE Important Questions

CBSE Guess > Papers > Important Questions > Class XI > 2013 > Computer Science > Computer Science By Mr. Prabhuji Gupta

CBSE CLASS XI

Structured Data Type : Array

 

Index Next

Q 1 What do you understand by index of an element?
Q 2 How does an array element accessed ?
Q 3 Write a statement that defines an uninitialized array to store coin types and initialize it to values 10p, 25p, 50p,1.25p.
Q 4 Write a statement that defines a string constant called chemical with the value “CH6H2O6H20” ?
Q 5 What is a Multi-Dimensional array ?
Q 6 Give an example of multi-dimensional character array.
Q 7 Write a statement to initialise an array of integer type at the time of declaration.
Q 8 In C++, what types of data are represented by a vector?
Q 9 Write formula to calculate total number of bytes required by a two-dimensional array.
Q 10 Define arrays.
Q 11 How many bytes will return by the following statement: sizeof(int) ?
Q 12 Write formula to calculate total bytes required by a one-dimensional array.
Q 13 Determine the number of bytes required to store an integer array "A[10]", if the int size is 4 bytes?
Q 14 Discuss array of strings with example in C++.
Q 15 What is an array? Also discuss its various types.
Q 16 Illustrate the process of addition of two matrices A and B, and shows the result in the third matrix i.e. C.
Q 17 Which of the following array declarations are invalid? Also state the reasons for invalidity.

(i) float values[10];
(ii) double a[40];
(iii) int num[0-10];

Q 18.

a) Declare an array of 25 characters.
b) In an integer type array initialize it with the first five elements.

Q 19 Discuss diagonal elements of a matrix. Also write the diagonal elements of the following matrix A.

1 2 3
4 5 6
7 8 9

Q 20 What is the output of the following code segment ?

{
int I,j;
int sum=0;
int x[][3]={{5,4,3},{8,2,7},{5,2,1}};
for(I=0;I<3; I++)
for(j=0;j<3;j++)
sum=sum+x[I][j];
cout<< sum ;
}

Q 21 How does C++ view a string as? Which character marks the end of a string?
Q 22 How does a single-dimensional array represented in the memory? Also discuss its properties.
Q 23 Differentiate between sized array initialization and unsized array initialization?
Q 24 What is a vector?
Q 25 How does C++ calculate the size of an unsized array? Discuss it with the help of examples.
Q 26 Write a code segment for calculating sum of the diagonal elements of a matrix?
Q 27 Write a program code in C++ to concatenate two strings.
Q 28 Explain the declaration statement of single-dimensional array and two-dimensional array with example.
Q 29 Discuss two-dimensional array with example. Also write a program to read sales of 5 salesmen in 12 months and to print total sales made by each salesman.
Q 30 Write a C++ code fragment to print the squares of diagonal elements of a given matrix X[p][q]. The given matrix is already a created one.

 

Index Next

Submitted By Mr. Prabhuji Gupta
Email: [email protected]