144 - Computer Science
144 - Computer Science
5fa"dgslatdwl ' e
Roll No.
No. of printed pages : I
t1 I [P.r.o.
,l
a
(ii) U<-n+xrEesqffir
(iii) erfi dxil€r (iv) frx mrildel
which of the following is not a type of constructor in c++
-
(i) Default constructor (ii) parameterized constructor
(iii) copy constructor- (iv) Friend Constructor
(rr') frrr fr * fu,fl 6r s-'crT c++ c rb-driE utqurT o1llqlfu
b ftra fu-qr arm dl 1
444AAZ)
12l
(st $rc{id q{ ffi resource 61 d}ym Frq C + fuHb gKI (T6rmTr) qrw +e d-
The location of a resource on the interent is given by its- 1
Write the name of the header file for the following function-
(i) putso (ii) setw()
3 N frrdi & e)-i
s.6r< di 1
;'; *;tsur
the following in Database concept-
Define
(i) PrimarY KeY (ii) Candidate KeY
Z
13 }i+F"*;5e. b uo-uo srqt E 36-srlfrRrit fibers'
*r,i" io*n one advantage and one disadvantage of optical 2
14. wLL w qs-q As ftRg-dt
Write a short note on WLL' 3
1s. ligq fr'flq mT 3{Bqt gra dHm -
Find the output of the following program -
# i nclurde< iostrea m' h >
void rnain 0
{
int x[ ]={10,25,30,55,i10};
intxP-x;
while (xP< 110)
{
*p= *p+ L;
else
*p_xp*2i
p+-;
)
for (int T=4; l>1; I--)
Jt
cout<<x[I]<<"*";
If (Iolo3==0)
cout< <endl;
'l
I
cout<<x[0]x3<<endl;
)
6-dt dl sqrf<.'r qfff Hqflr$ul
3
16. fr.d rirffiq {H
WhatisfriendFunction?Explainwithexample'
3lerqr/oR
E6 c++ HqT d fr'rq frftqs, *
TS,,*" fr d ffqffi o\ dls-m dt
same size'
Wrlte a program in C++ to add two matrix of
444(tAZ) t4l
t
L7 . frq qirs b smm qq w$i (i) t (iii) ao b r.r< ftifus-
Answer the Question (i) to (iii) based on the following code- 3
class Regular
t
char School-Code [10];
puhlic :
rroid In-Regular ( );
void Out-Regular ( );
1.
Jt
class Distance
{
char StudY-Centre-Code [5];
public :
void In-Distance ( );
void Out-Distance ( );
1.
fr
class Course: Public Regular; Private Distance
{
char Code [5];
f loat Fees;
int Duration;
public :
void In-Course ( );
void Out--Course ( );
);
(il strffi ols tifux, s-oi< oi g*Rls mr fu*q f 1
State De-Morgon's TheoremlLaw. Verify any one of the De-Morgon's Law using
a Truth rable'
',3[era17gp
qEf, fr+ or Frqq corEr fu'fr r'o Frqq 61 strfr sdHT Hnffi d vdrqil t ssrfr"a
frffirnt
State Absorption Law. Verify any one of the Absorption law using a truth tabie.
444(tAZ) Isl [P'r'o'
I
Entero //
Afunction to ailow user to enter varue of
//
M_Code, M,_Name, M_pop, Area and CaldenO function
ViewAllO //
A fulnction to display data memeber
//
A.lso display a message ',!-ligh populated Area,'
//
If the density is more than i2,000.
zz. mq,ffi{ 3flq CRnffiq aDT qq}T m<& 6u ffi
mrs b fr! qtflq 6tsfrfuuI 4
Write a program Code for a class using constructor and destructor.
23. c++ qqJ r) w ritdqm frfuu ril FrqftTfotr ffirrs student b 3rc-fr) 61ffi qrETfr
tFr{f, d ftrgdT dr- 4
Write a function in C++ which is used to write the objects of following class
student in a hinary file-
class student
{
int regno;
char name[20];
public:
void getdatao
i
cout "enter registnation No.";
cin>>regno;
cout"enter l.lame";
cin> >name;
)
void putdataO'
)
, cout<<regno;
cout< < name;
); )
3re[q[/oR.
444(tAZ) t6l
c+ + iiltrT fr uo riffirq ftfuu a\ uo dffi srid old.txt 6) $rfi dffi wr{f, new.txt
frffimtl
Wr-ite a function in C++ which copy the content of one text file old.txt into
another text file new.txt.
24. A14..7, -1..31 gtq fit{rfrH Eo 2-D tt mr q-dd ffir 2 qrfc ds trsar dt qfr t't C
.1fu rgs mq C €Ii fuqT fldI d C n po, 2l dl rl?tT Et?i dm, ts qf,r 100 frqi dl
.4
A 2-D array defined as A [4,.7, -7..3] requires 2 bytes of storage space for
each element. If the array is stored in row-major form, calculate the address of
A [6, 2], given the base address as 100.
zs. ffiaqCffiEo1ffidPdre-ddbft?urffiemfrftsut 4
.{
(m) sQL 3fl'evr frfu - 1 xz=Z
Write SQL Commands -
(i) Stock tsd d item 61{ifr ftrd$rr 6} r{b etv b q.6a m-q fr aertrTr
To display details of all items in stock table in ascending order of Qty.
(ii) stock &m q item b &aa rq frd.Tl 6\ oqrfqr ffi unit price 10 qT llr$
3rftr6 dr
To ciisplay the details of those items whose unit price is 10 cr more
than 10.
trql Frq 3lT&Tt 6[ output dtT[ 6t[r LxZ=2
What will be the output of following commands -
(i) Select Count (Distinct Dcode) from Stock;
(ii) Select min(stock Date) from stock;
*****
"l
444(rAZ) 8J