Page 1
+d-i.
Roll No.
-T-IT-[T gBtgdd€qr ' 4
No. of printed pages : 4
I
L44 444 (tPL)
2022
ryIf{frflq(ffi<ol
CoMPUTER SCIENCE (THEORY)
qqq,sqEtl [Eurto r7o
Time : 3 Hours I [Max. Marks :70
ff{sr : (i) sfr qqi'3rFnrd dt
(ii) fmtiiT sqql : f++
(iii) ce-d] b 316 s{b q-e sifua dt
Note : (i) All questions are compulsory.
(ii) Programming language : C++
(iii) Marks allotted to the questions are indicated against them.
1. (6) elTfiq 3ft rdtsd rr ffir 6)A d? 2
What are local and global variables?
(s) 6-qtr{ wi H,rcrq 6-ftT-i'fier eiaq da 2
What is the difference between constructor and normal function?
(rr) €RrHitBqffiolvrs,sut 2
Briefly explain Destructor.
(u) ftdfrdRftqfiqg"Hero" ft'sotma 2
How many times the following program will print "Hello"?
# include < iostream.h>
{
while (1)
{
cout << "Hello";
)
)
111 lP.T.O.
Page 2
(B) (i) FH 6ts b ftru:+r+cq-6 fu1wr{e 6I iIrI qfrrgu - 1
Name the header files that shall be needed for the following code -
{
char word [ ]= "Board Exam";
cout<< setw (20) << word;
)
(ii) ttffisibqeutqfrq&wiaita-sdt - 1
What would be contents of following after array initialization -
int A [5] = {3, 8, 9}
2 (o) t6{6-ftr-iE?irdtcRdqvm3ffi-{$q-flFul 4
Explain Member function and scope resolution operator.
(q) tffiorgodtfu-ocnrEa3ffisnffirfir 2
What are basic file operations on text file?
1n1 ffifua ffiqq, d q-6d t q{ 4-tr6 mrc. ol c++ t qft'rTfra dfru ' 4
Define a class named Tour in C++ with following description :
Private members :
tcod e integer (Ranges 6- 10)
adults, child ren, distance integer
total_fare float
Assig n_fare ( ) A function which calculates fare and
assign value to data member total-fare
total-fare calculated as follows I
- For adults
For every adult a fixed Rs' 100 is charged as fare.
- for children
For every child a fixed Rs'50 is charged as fare.
Public members :
x A constructor which initialized all data members with 0.
x Function Enter-Tour ( ) to input the values of the data members
tcode, adults, children and call to Assign fare function.
x Function show-tour ( ) to print all details of object of Travel type'
3. (m.) 3nd-de3ilRdesMhT*3TllT@TTsffiid? 2
What do you understand by object oriented programming?
(E) fta'riffirqffio-ri& 3am<uTgtrd$qflr$ul 4
What is friend function? Explain with an example.
444(rPL) l2l
Page 3
(:T) Rqffiqc#rcct, csiih3-tmfiBs ' 4
consider the following declarations and answer the questions given below:
class vehicle
t
int wheels;
Protected:
int passenger;
Public:
void inPut-data (int, int);
void output-data O;);
class heavy-vehicle : protected vehicle
{
int diesel-Petrol;
protected :
int load;
public:
void read-data (int, int);
void write-data O;);
class bus: Private heavY-vehicle
{char marks [20];
public:
void fetch-data (char);
void disPlaY-data O;);
(i) Name the base class and derived class of the class heavy-vehicle'
(ii) Name the data members that can be accessed from function display-data0
(iii) Name the data members that can be accessed by an object of bus class.
(iv) Is the member function output_datao accessible to the objects of heavy-
vehicle class.
4. (d,) €-6 d rca t $iftffi Effiiqq d t'r€frffi trffinqq fi qa6i b ftE EFriR?fr
frfuer 4
write an algorithm to convert infix expression to postfix expression using
stack.
(rc) E6 tt n trol t2ol ffrft fr tr qBd €k fuqr drdr tl Fs tt b F{ r'ftC-c ol a
Brf,d €ltd d 3Trdcq-6"T t I qft ti n mr &s t$e sooo t d tt n t 3 I t s I o.r s*-s
d-dlssl 3
For a given array A tlOl t20l is stored in the memory along the row with
each of its elements occupying 4 bytes' Calculate address of A [3] [5], if
the base address of arraY A is 5000.
444(rPL) t3l [P'r'o'
?
Page 4
5 (o.) qqr6t{-6h$ffifials6-&d? Trrflr$Er 3
What are the operations that can be performed on Queue? Explain.
(s) dq?TmCbfruudirRqftfust 4
Write an algorithm for bubble Sort.
6 (6) sel@rtafq-frBe)s-drusd]-$ut 4
What is SQL? Write its ch a ra cteristics.
(s) srd-ifl*da$Cqq6poolqRt+rftao1Bs, 4
With reference to database define following :
(i) Field (ii) Record (iii) Database (iv) Primary Key
st6 fibYd elcr&fl qr{qtd
7 (m) RrgdBu i c
Prove that :
xy +yz+yz' =y
tu) qftm ffin t Aqrar ftatro E?i E-trrpfq Fqq tqw dri or ftw) d frfuu E?i
werfr-odBst 3
State and verify Duality principle and Absorption law in boolean algebra.
(rr) qft F (a, b, c, d)=216, 2, 4, 5,7, 8, lo, 72, L3, 75) 3
e't r-map d c-drd t s<-d dfrut
If F (a, b, c, d)=E(0, 2,4,5,7,8, 70, 12, L3, tS)
Obtain the Simplified form using K-map.
8 (o) *{ Ed Aq ii er eia< d? 2
What is the diFFerence between WAN and LAN?
(E,) Hrils{ dT b dr rgr'fu a-*rgst 2
Write two applications of Cyber Law.
(q) fu=€tqRqlcfrYnqlBqTbilqfrfuut 2
Write names of any four Transmission media.
(q) fitaftddBu, 2
Define:
(i) E-Mail (ii) sMS
$-+d rr$ ulr urr
(E) Frqfrfuamrg{rimfrfuu, 2
Expand the following terms:
(i) MoDEM (ii) cDMA
msq Sfisqe
*tt***
444QPL) 141
I