(Paper) Sample Paper Class - XII Computer Science 2008

Disclaimer: This website is NOT associated with CBSE, for official website of CBSE visit - www.cbse.gov.in

 

Sample Paper Class - XII Computer Science 2008

 

Class – XII
Subject – Computer Science

Basic theory (4 Marks)

 

  • What do you understand by procedural programming paradigm?

  • What do you understand by object oriented programming paradigm?

  • Explain all the features of OOPs with their implementation in C++.

  • Why main function is so special in C++. Give at least two reasons.

  • Write two advantages of using #include complier directive.

  • Differentiate between a run time error and syntax error. Give one example of each.

  • Illustrate the concept of function overloading with the help of an example.

  • Why is a destructor function required in classes? illustrate with the help of an example.

  • Illustrate the use of this pointer with the help if an example.

  • What is the use of a constructor function in a class ? Give a suitable example for a constructor function in a class.

  • Illustrate the concept of function overloading with the help of an example.

  • Differentiate between a constructor and destructor function.

  • Illustrate the use of “self referencing structures” with the help of an example.

  • What is the purpose of a header file in a program?

  • What do you understand about a base class & a derived class ? if a base class and a derived class each include a member function with the same name and arguments , which member function will be called by the object of the derived class if the scope operator is not used ?

  • What do you understand about a member function ? how does a member function differ from an ordinary function ?

  • Differentiate between call by value & call by reference with a suitable example.

  • Differentiate between  global & local variable with a suitable example.

  • Differentiate between nested class & inheritance with a suitable example.

  • Differentiate between default & copy constructor with a suitable example.

  • What are advantages of OOPs over procedural programming?

  • Illustrate the use of #define in C++ to define a macro.

  • Define Multilevel & multiple inheritance in context of OOP with suitable example.

  • Illustrate the use of inline function in C++ with the help of a suitable example.

  • What is a default constructor ? how does it differ from destructor?

  • Differentiate between a date type struct & a data type class in C++.

  • Explain the concept constructor overloading with a suitable example.

  • What do you understand by visibility modes in class derivations ? what are these modes.

  • What do you understand by Syntax Error, logical Error & Run time error.

  • Define the term #define & typedef with suitable example.

 

Error (2or 3 marks)

  • #include<iostream.h>

void main()

{

            const MAX=0;

            int a,b;

            cin<<a>>b;

            if(a>b) MAX=a;

            for(x=0,x<MAX;x++) cout<<x;

}

 

 

  • #include<iostream.h>

Main()

{

            int ch=9,sch=90;

            char S[2,2];

            if ch<=9

                        cout<<ch;

            for(int x=0;x<2;x++)

                        for(int y=0;y<2;y++)

                        {

                        if(y==0) S[x][y]=’A’;

                        else

                                    cout>>S[x][y];

                        }

            getch(); }

 

 

  • Class X

{

            public:

                        int a,b;

                        void int(void)

                        {

                        a=b=0;

                        }

                        int sum(void);

                        int square(void);

            };

int sum(void)

{

                        return a+b;

}

int square(void)

            {         

                        return sum() *sum();

}

 

 

  • include<iostream.h>

void main()

{

            int R; W=90;

            while W>60

            {

                        R=W-50;

                        switch(W)

                        {            20:cout<<”Lower range”<<endl;

                                    30: cout<<”Middle Range”<<endl;

                                    20: cout<<”Higher Range”<<endl;

                        }

            }

}

 

 

  • #include<iostream.h>

main()

{

            int x[5],*y,z[5];

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

            {

                        x[i]=I;

                        z[i]=i+3;

                        y=z; x=y;

            }}

 

 

  • class ABC

{

            int x=10;

            float y;

            ABC(){ y=5; }

            ~AB?C() {}

};

void main()

{

            ABC a1,a2;

}

 


  Go To Page :   1,   2,   3,   456   >>