NIOS Class 12 Computer Science Chapter 16 Array

NIOS Class 12 Computer Science Chapter 16 Array Solutions English Medium As Per New Syllabus. to each chapter is provided in the list so that you can easily browse throughout different chapters NIOS Class 12 Computer Science Chapter 16 Array Notes and select need one. NIOS Class 12 Computer Science Question Answers Download PDF. NIOS Study Material of Class 12 Computer Science Notes Paper 330.

NIOS Class 12 Computer Science Chapter 16 Array

Also, you can read the NIOS book online in these sections Solutions by Expert Teachers as per National Institute of Open Schooling (NIOS) Book guidelines. These solutions are part of NIOS All Subject Solutions. Here we have given NIOS Class 12 Computer Science Textbook Solutions, NIOS Senior Secondary Course Computer Science Notes for All Chapter, You can practice these here.

Chapter: 16

Module – 3: Programming in C++

INTEXT QUESTIONS 16.1 

1. Write a statement that defines one dimensional array called student of type int that holds 5 data elements. 

Ans: int student [5];.

2. In the following array declarations find the number of elements in each array and total no. of bytes required to store each array.

(a) int A [ 20 ]; 

Ans: Number of elements – 20 Total number of bytes – 40.

(b) char z [ 18 ] ;

Ans: Number of elements – 18 Total number of bytes – 18.

3. What will be the output of the following programs?

(a) # include < iostream.h > 

void main ( ) 

{

      int a [ 5 ], t ; 

      for (i= 0; i < 5; i ++ ) 

      a [i] = 5 * i; 

      for (i = 0; i < 5; i ++) 

      cout << a [ i ]; 
}

Ans:  0 5 10 15 20.

(b) # include < iostream.h > 

      void main ( ) 

     { 

        char title [ ] = “Computer”; 

        for ( int i = 0; title [ i ]; i ++) 

        cout << “\n” << (title + i); 
}
Ans: Computer
omputer
mputer
puter
uter
ter
er
r

INTEXT QUESTIONS 16.2 

1. Define a two dimensional array A having 2 rows, 3 columns and stores int data type. 

Ans: int A [ 2 ] [ 3 ];.

2. Consider the following array declarations. Find the number of elements in each array and total number. of bytes required by each array. 

(a) int x [ 5 ] [ 10 ]; 

Ans: Number of elements – 50 Total number of bytes – 100.

(b) long y [ 5 ] [ 10 ];

Ans: Number of elements – 50 Total number of bytes – 200.

TERMINAL EXERCISE 

1. What is the need of an array? 

Ans: An array is used to store multiple values of the same data type in a single variable. It makes data handling easier, saves memory, and helps in writing clear and efficient programs.

2. What do you mean by searching? 

Ans: Searching is the process of finding an element within the array list.

3. What do you mean by sorting? 

Ans: Sorting is a method to arrange the list either in ascending or descending order.

4. Write a program that will read 20 float values in a one dimensional array and find out the following:

(i) Number of values greater than zero. 

Ans: #include <stdio.h>

int main() {
    float a[20];
    int i, c = 0;

    for (i = 0; i < 20; i++)
        scanf("%f", &a[i]);

    for (i = 0; i < 20; i++)
        if (a[i] > 0) c++;

    printf("%d", c);
    return 0;
}
NEW VIDEO CLASS

Subject Ka Complete Video Solution Dekhein

Step-by-step easy concept explanation aur full questions Answer ke liye watch karein ya app download karein:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top