You are here: Home > Board Exams
All posts from

nvsrochd.gov.in : Class XII Computer Science Question Paper Navodaya Vidyalaya Samiti

Board : Navodaya Vidyalaya Samiti
Exam : Class XII Computer Science
Document Type : Study Material
Website : nvsrochd.gov.in

Download Model/ Sample Question Papers :
https://www.pdfquestion.in/uploads/6621-Sample-0.pdf

Computer Science Theory Question Paper

Class XII – Code : 083
Design of Question Paper for 2009-2010
TIME : 3 Hrs MM : 70

1. (a) What is the difference between Global Variable and Local Variable? Also, give a suitable C++ code to illustrate both. 2

Related / Similar Question Paper :
NVS Class XII Commerce Question Paper

(b) Which C++ header file(s) will be essentially required to be included to run / execute the following C++ code: 1
void main()
{
char Msg[ ]=”Sunset Gardens”;
for (int I=5;I<strlen(Msg);I++)
puts(Msg);
}

(c) Rewrite the following program after removing the syntactical errors (if any). Underline each correction. 2
#include [iostream.h]
class MEMBER
{
int Mno;float Fees;
PUBLIC:
void Register(){cin>>Mno>>Fees;}
void Display{cout<<Mno<<” : “<<Fees<<endl;}
};
void main()
{
MEMBER M;
Register();
M.Display();
}

(d) Find the output of the following program: 3
#include <iostream.h>
struct GAME
{ int Score, Bonus;};
void Play(GAME &g, int N=10)
{
g.Score++;g.Bonus+=N;
}
void main()
{
GAME G={110,50};
Play(G,10);
cout<<G.Score<<“:”<<G.Bonus<<endl;
Play(G);
cout<<G.Score<<“:”<<G.Bonus<<endl;
Play(G,15);
cout<<G.Score<<“:”<<G.Bonus<<endl;
}

(e) Find the output of the following program: 2
#include <iostream.h>
void Secret(char Str[ ])
{
for (int L=0;Str[L]!=’\0′;L++);
for (int C=0;C<L/2;C++)
if (Str[C]==’A’ || Str[C]==’E’)
Str[C]=’#’;
else
{
char Temp=Str[C];

(f) In the following program, if the value of Guess entered by the user is 65, what will be the expected output(s) from the following options (i), (ii), (iii) and (iv)? 2 #include <iostream.h>
#include <stdlib.h>
void main()
{
int Guess;
randomize();
cin>>Guess;
for (int I=1;I<=4;I++)
{
New=Guess+random(I);
cout<<(char)New;
}
}
(i) ABBC
(ii) ACBA
(iii) BCDA
(iv) CABD

2.
(a) What do you understand by Data Encapsulation and Data Hiding? Also, give a suitable C++ code to illustrate both. 2
(b) Answer the questions (i) and (ii) after going through the following class: 2
class Seminar
{
int Time;
public:
Seminar() //Function 1
{
Time=30;cout<<“Seminar starts now”<<end1;
}
void Lecture() //Function 2
{
cout<<“Lectures in the seminar on”<<end1;
}
Seminar(int Duration) //Function 3
{
Time=Duration;cout<<“Seminar starts now”<<end1;
}
~Seminar()
//Function 4
{
cout<<“Vote of thanks”<<end1;
}
};
i) In Object Oriented Programming, what is Function 4 referred as and when does it get invoked/called?
ii) In Object Oriented Programming, which concept is illustrated by Function 1 and Function 3 together? Write an example illustrating the calls for these functions.

(c) Define a class TEST in C++ with following description: 4
Private Members
** TestCode of type integer
** Description of type string
** NoCandidate of type integer
** CenterReqd (number of centers required) of type integer
** A member function CALCNTR() to calculate and return the number of centers as (NoCandidates/100+1)

Public Members :
** A function SCHEDULE() to allow user to enter values for TestCode,
Description, NoCandidate & call function CALCNTR() to calculate the number of Centres
** A function DISPTEST() to allow user to view the content of all the data members

(d) Answer the questions (i) to (iv) based on the following: 4
class PUBLISHER
{
char Pub[12];
double Turnover;
protected:
void Register();
public:
PUBLISHER();
void Enter();
void Display();
};
class BRANCH
{
char CITY[20];
protected:
float Employees;

(i) Write the names of data members, which are accessible from objects belonging to class AUTHOR.
(ii) Write the names of all the member functions which are accessible from objects belonging to class BRANCH.
(iii) Write the names of all the members which are accessible from member functions of class AUTHOR.
(iv) How many bytes will be required by an object belonging to class AUTHOR?

3. (a) Write a function in C++ to merge the contents of two sorted arrays A & B into third array C. Assuming array A and B are sorted in ascending order and the resultant array C is also required to be in ascending order.
(b) An array S[40][30] is stored in the memory along the row with each of the element occupying 2 bytes, find out the memory location for the element S[20][10], if the Base Address of the array is 5000.
(c) Write a function in C++ to perform Insert operation in a dynamically allocated Queue containing names of students.

Leave a Reply

How to add comment : 1) Type your comment below. 2) Type your name. 3) Post comment.

www.pdfquestion.in © 2021

Contact Us   Privacy Policy   SiteMap