New ! Computer Science MCQ Practise Tests



Arrays and Structures Model Question Paper

11th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 01:30:00 Hrs
Total Marks : 50
    6 x 1 = 6
  1. Which of the following is the collection of variables of the same type that an referenced by a common name?

    (a)

    int

    (b)

    float

    (c)

    Array

    (d)

    class

  2. The data elements in the structure are also known as _________.

    (a)

    objects

    (b)

    members

    (c)

    data

    (d)

    records

  3. What will happen when the structure is declared?

    (a)

    it will not allocate any memory

    (b)

    it will allocate the memory

    (c)

    it will be declared and initialized

    (d)

    it will be only declared

  4. 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 = shoe 1;
    shoe2.price = shoe2.price / 9;
    cout << shoe2.name << "#"< return 0;

    (a)

    Adidas # 9.99
    Adidas # 1.11

    (b)

    Adidas # 9.99
    Adidas # 9.11

    (c)

    Adidas # 9.99
    Adidas # 11.11

    (d)

    Adidas # 9.11
    Adidas # 11.11

  5. When accessing a structure member, the identifier to the left of the dot operator is the name of

    (a)

    structure variable

    (b)

    structure tag

    (c)

    structure member

    (d)

    structure function

  6. How many types of arrays in C++?

    (a)

    2

    (b)

    3

    (c)

    4

    (d)

    many

  7. 7 x 2 = 14
  8. What is Strings?

  9. Define structure .What is its use?

  10. To store 100 integer number which of the following is good to use?
    Array or Structure
    State the reason.

  11. Write a structure definition for the structure student containing examno, name and an array for storing five subject marks.

  12. Differentiate array and structure.

  13. What is subscript of an array?

  14. Write the syntax of creating a character array.

  15. 5 x 3 = 15
  16. Define an Array? What are the types?

  17. Write a C++ program to accept and print your name?

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

  19. Write the syntax and an example for structure.

  20. What is called anonymous structure. Give an example

  21. 3 x 5 = 15
  22. Explain call by value with respect to structure.

  23. 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);

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

*****************************************

Reviews & Comments about 11th Standrd Computer Science - Arrays and Structures Model Question Paper

Write your Comment