Page 1
Uttarakhand Board
Question Paper
CLASS 12
Page 2
+dd. gEH ysi 6t dqr 8
Roll No.
No. of printed pages : 8
L44 444 (rcz)
2023
oqxtrflq(darrfuot
CoMPUTER SCTENCE (THEORY)
Hrrq'auu|1 1ffi;zo
Time :3 Hours I [Max. Marks : 70
fr{qr' (i) sfl ffi-q;{ d gf, 26 qwr dr srfr qsn 3{FHrd dr
Directions: There are in all 26 questions in this question paper. All questions
are compulsory.
(il) qvlttg ft€rfRd 3i6 rtb vq-rq sifu-a dr
Marks allotted to the questions are mentioned against them.
(iii) q-d6 wq 6) €ffiTd6 fr0 aqi Hgfun sr< fiHer
Read each question carefully and answer to the point.
( iv) uvq ffisT t qgftm-ffiq wq dt
W qwr b q--&6 reu-s b rfl{ C il( fr6-G
frd rs dl s& fr-68 3{wS rd{gfuoT ti ftfusr ssq s@T z z ro t
Frkrd rdfu es{ dt
Question No. 1 is multipie choice question. Four options are given
in answer of each part of this question. Write correct option in your
answer book. Question No. 2 to 7 are definite answer type
questions,
(v) sqq srffi 1 6l e-*6 qrs 116 si6 6l tt ss{ dun z t z a6 116 316 b
vs{dt qqqsqra t r+ fl6a\3i6bes{dt ggqsqT 15 t20 d6fi{
3i6 b wq dt qw €Eqr 21 t 26 ftD uR 3i6 b qq..q dt
Each part of Question No. 1 carries one mark. Question No. 2 to 7
are of one mark each. Question No. 8 to 14 are of two marks
each. Question No. 15 to 20 are of three marks each. euestion
No. 21 to 26 are of four marks each.
(vi) Sfl qwl-wr fr qq-q'T{ 6t$ fro,g Tfr t Henfr 6frsq ss{tii3{ffio. B6@
e-{H fuqT rrqT tt i'S esiiC b{f, E-6 fuffT 6'r fr r+< frBer
There is no overall choice in this question paper, however; an internal
choice has been provided in few questions, Attempt only one of
the given choices in such questions.
I1I lP.T.O.
Page 3
1 . (6) c+ + Lr6. .. ..q!trrfilrr r+rqT t |
..
1
(i) 3ildrtr 3ilRffis (ii) Tra;{IcI6 (iii) sqftq (iv) sB-qrflfi
C++ is a/an . .....' Programming Language'
(i) Object oriented (ii) Structural (iii) Modular (iv) Procedural
(s) maino t eo - 1
(i) 6fut' (ii) 3ffitr (iii) tirffiq (iv) g+ttot$qfi
Main O is a/an
(i) Keyword (ii) object (iii) Function (iv) None of these
(rr) c++ qlql C t5{ Fr$-d 6l E-rf,m fufl< @T *? 1
Header file have the file Extension in C++ as -
(i) .h (ii) .he (iii) 'P (iv) 'head
(q) qfus q{ sTffikd t? 1
(i) LIFo fudrfr (ii) FIFo k&r;f, (iii) tdu Eei (iv) Ofl-rrd tt
A Queue follows-
(i) LIFO principle (ii) FIFO Principle (iii) LINERTREE (iv) Ordered array
(s) sQL C DDL 6T ffif, Erq dqT t- 1
The Full form of DDL in SQL is -
(i) Dynamic Data Languages (ii) Detailed Data Languages
(iii) Data Definition Languages (iv) Data Derivation Languages
(a) qw dH o'r Frqq (Absorption Law) b ftTu 4fl6 t - 1
The Expression for Absorption Law is -
(i) A+AB=A (ii) A+AB=B (iii) AB+AA'=A (iv) A+B=B+A
(u) ffi oT iad& fus =rlq t arqr f,rdr t? '1
(i) 5_{1rfu (ii) ffifu (iii) ri-d11ufisrffi (iv) *q
Network of Networks is knourn as -
(i) Intranet (ii) Internet (iii) Local Area Network (iv) wan
(6) frq fr t 6t{ riigd"rE 3t< furgd'nq b frs s-ftIfoqT 6ral t? 1
(i) trrdrd (ii) fr*q (iii) m (iv) qffi6q
Which of the following is used for Modulation and Demodulation-
(i) Protocol (ii) Modem (iii) Gateway (iv) Multiplexer
444(rGZ) I21
I
Page 4
Z. C++ HInil ii 'a' 3lk "u" fr ffif 3{<R t?
1
What is the difference between 'a' and "a" in C++?
3. &smrsffio-atdl 1
What is base class?
4. Efu iRrrav) fr qfr 3n?iu-{ dr$ dru
tt ta 1
HowismemoryallocatedforTwoDimensionalArray?
s. sQL C f{o.-fl (Alternativ"l Ffi ffi
o-rt da 1
What is an alternative keY in SQL?
6. a\ go a-rffi6 td & qll frfrsul 1
Write the name of two basic logic gates'
7 . ffi 3Trf ft.q-e b ffi
qrr *t de 1
How many parts are there in any IP address?
B. iiffiHffirBr@ld? sfuar+rwrolsa-qortqqflTAl 2
example.
What is Function overloading? Explain with the help of suitable
9. Fm frtr-q ol outPut f,ra e1m - 2
Find the output of the following program-
#include < iostream.h>
void main o
{ int A=5, B=10;
for (int i=1; i<=2 i+*)
{
Cout <<"Line 1"<<A++<<"&"<<"8-2<< endl;
Cout <<"Line 2"<<++B<< "&"<< A+B <<endl;
)
10. uu, Ut rt2sl t20l qfu & efiei ffier C Etr d, ff,so-r s-d-6 ffiI
(element)2 bvtes
dq m<ar t, Hsq'-r Base Address 42000 tt rt10l tlsl fr dbqq flf, dim 3ll-{ Ut
fr gm 3idrrdJ of risr fi m-a o}H | 2
each element
An Array Tt25l [20] is stored along the row in the memory with
requiring 2 bytes of storage of the base Address of array is
42000' Find the
in the
Location of T[10] t151. Also find the total number of elements J'i-st..t
array.
t3l I P.T.O.
444(tGZ)
.l
Page 5
11. qffim3fffimafiHu- AB+c* p/ 2
qfr A=2, B=3, C=4, D=5
Evaluate the Post fix Expression AB+C >< P/
if A=2, B=3, C=4, D=5
12. DDL 3fr{ DML ol+ss b se1 C d-d Tfl-6-{q fiBut
Give two example each of DDL and DML Commands in SQL.
13. rcP/rP @T *? sfhw fr qrsr otBst
What is TCP/IP? Explain briefly.
14. u{ rrf,rr dq dq\ffi-S dl [16 6pr d t'6 6'IF ftrRrdl I
Write one Advantage and one Disadvantage of Star and Linear Topology.
1s. frq 6ts o\ vge o-<b y, frfu- 3
Rewrite the following code after correction-
include <iostream.h>
Include <stdio.h>
Class My student
{int studentld= 1001;
Char Name l20l;
Public
Mystudent O t)
void Register 0
{Cin>>student ld;
gets (Name);
)
Void Display o
)
Cout <<Student ld<<":"<<Name <<endl; )
);
Void main 0
{
My Student MS;
Register. MS 0;
MS. Display O;
i
444(tGZ) I4l
a
Page 6
16. Fq riqrq b s+rum qq fiffi1fo6 seq) ril t (iii) ro b sa-< frfts-i- 3
Answer the following Questions (i) to (iii) based on the following program-
Class Student
{
int Rno;
Char Name }AL
float Marks;
Protected:
Void Result O;
Public;
Student 0;
Void Register 0; Void Disptay 0;
'\.
Class Faculty
{
long Fcode;
Char FName [20];
Protected:
float Pay;
public:
Faculty 0;
Void Enter O;
Void Show 0;
)
Class Course : public student, private Faculty
{
Long ccode [10]; Char CourseName [50];
Char StartDate IB], EndDate [g];
pu blic;
Course O;
Void Commerce 0;
Void CDetail O;
j;
(i) sqttr c++ otg d fuH s.-6T-{ b S+Rt< 6l ftrflur ftrqr rrqr dl
which type of inheritance is illustrated in above c++ code?
444(rGZ) I5I
I P.T.O.
Page 7
(ii) r{.sfr ier Nt 6-r qlrr ftTfuu sil mm 6td b tw{ drflr{ 6rqd C qF d.q
dt
Write the name of all data members, which is/are accessible from member
function Commerce of class course.
(iii) s{ iflfr +sti6l qrr frffi, dt mre qffi-d &. 3rrciffi fi q.apT/ uga *u f;t
Write the name of all members, which are accessible from objects of class
faculty.
L7. sfua r<r6qpT t6a 'copy constructor' dl Hqs-E-el 3
What is a 'Copy Constructor'? Give a Suitable Example.
S{erqr/OR
BqfiFu m-qre{ * s+m mr sqgt da sfua sdT-d-{q b qrsT sqgrgdl
What do you understand by a Default Constructor? Give a Suitable example.
18. K-Map 6-r r'frT m-cfr 6u rrmt-fr-{ur a;ttst- 3
Simplify using the K-Map-
F(a, b, c, d) = t (0, L,3,4,5,7,8,9, L7,12, i3, 15)
STerqr/oR
fu qfr* Hftorur o.r H{frflur yrd dM -
Obtain a simplified form for the following Boolean Expression-
F(U, V W, Z) = n (0, t, 3, 5, 6, 7, L0, 14, 15)
1e. tA+a+c) (n+s+C) (n+s+-) o) ruon-to-NoR drffio' ffi b sq d qdtrrd mRuts
Represent fA+a +C) (n+a+C; 1n+e+-; in NoR-to-NOR Logic Network.
zo. ri"T{ qTtqq ffir t? F{b q-6Tit mr S*q ii dufq otBut 3
What are Communication Medium? Briefly explain its types.
zL. c++ qs1fr ffi diffi (Box) qrrkr ffirrfl mr frur fr'flq & smm q{ 6ts frRss- 4
Write the code fora Class Named as Box in C++ with the following description:
Private member
Box_Number // Data mernber of int type
Side // Data member of float type
Area l/ data member of float type
444(tGZ) t6l
a
Page 8
ExecArea 0 // member function to calculate and
assign Area as side x side
Public Members
GetBox 0 // A function to allow user to enter
value of Box Number and side.
// Also, this function should call.
Exec Area O to Calculate Area
ShowBox // A function to display Box Number,
Side and Area
22. ffi €wT b mgq Si qr q Eli sr qil ETr+ b ftru c++ r{TqT S riffiH o-r s*T s{A
Eu E6 mrrrq ftfut 4
Write a program in C++ to checkthat a number is prime or not, using function.
23. frET m'Jq or output f,rf, otHg - 4
Find the output of the following program-
# include <iostream.h>
Void main o
{
int Track[]={10,20,30,40}, x Striker;
Striker =Track;
Track[1]+=30;
x Striker -=10;
Striker ++;
Cout <<"Next @ "<< Striker << endl;
Striker +=2;
Cout <<"Last @ "<<"Striker << endl;
Cout <<"Reset To"<< Track[0] << endl;
)
3TeE[/9p
ffi qimn b ddf S frH d eq-flrss-
Explain the following in reference of some function -
(i) call by value
(ii) call by reference
444(rGZ) 17l I P.T.O.
4
Page 9
24. fu-S r&o. qr s} Eri dTfi fr-qpti push
3f{ ecp * fru ur.nnerq ftfisur 4
write an arEorithm for push and pop
operations on any stack.
3rerqr/oR
ffi rinked eueue ii rear end $ rnserrion
il frg E-FilRprq frfu&r
write an argorithm for Insertion in the
rear end of rinked eueue.
2s' infix Expression 6) post fix Expression d qREffid
s-{+ b t{q[Rqq d frfudr 4
write an argorithm to convert infix Expression
to post fix Expression.
26. (6) fu,fr tcd m ffi q c-+fr of frfh
rcrf,wr Hkd Hqflrwr
2
Explain the process of making
a view of a tabre with an exampre.
(q) where 3rtq havins ffisil fr q.,
3r-fi di ra-a<or Htrfr srflr$ur
2
what is the difference between where
and having crause? Exprain with
an
example.
*****
444(rGz)
l8I
?