Page 1
Total number of pages—12
29T CSCA
2019
COMPUTER SCIENCE AND APPLICATION
( Theory )
Full Marks : 70
Pass Marks : 21
Time : Three hours
The figures in the margin indicate full marks
for the questions.
Contd.
Page 2
1. Answer the following questions : 1×8=8
Ó¬˘Ó¬ ø˚˛± √õ∂ùü¸˜”˝1 ά◊M1 ø˚˛± :
(a) What is a derived class ?
Derived class øfl¬ ?
(b) Define Queue.
Queue ¬ı̫ڱ fl¬1±º
(c) What is visibility mode ?
Visibility mode øfl¬ ?
(d) What is a linear data structure ?
Linear data structure øfl¬ ?
(e) Write the name of any one operation performed on STACK.
STACK -Ó¬ ¸˜±Ò± fl¬ø11 ¬Û1± ø˚Àfl¬±ÀÚ± ¤fl¬ operation -1 Ú±˜ ø˘‡±º
(f) Define inheritance.
Inheritance ¬ı̫ڱ fl¬1±º
(g) What is Internet ?
˝◊KȬ±1ÀÚȬ øfl¬∑
(h) What does FRONT signify in a queue ?
Queue ¤È¬±Ó¬ FRONT-¤ øfl¬ ¸”‰¬±˚˛ ∑
29T CSCA [2]
Page 3
2. Answer the following questions : 2×10=20
Ó¬˘1 √õ∂ùü¸˜”˝ 1 ά◊M1 ø˚˛± :
(a) When is a copy constructor called ?
Copy constructor ¤È¬± Œfl¬øÓ¬˚˛± call fl¬1± ˝˚˛ ∑
(b) Write two differences between primitive and non-primitive data
types.
Primitive ’±1n∏ non-primitive data type -1 ˜±Ê1 ≈Ȭ± ¬Û±Ô«fl¬… ø˘‡±º
(c) Differentiate between linear queue and circular queue.
Linear queue ’±1n∏ circular queue-1 ˜±Ê1 ¬Û±Ô«fl¬… À˙«±ª±º
(d) What is POS ? Write with example.
POS øfl¬∑ ά◊±˝1Ì ¸˝ ø˘‡±º
(e) Draw the logical circuit diagram for DeMorgan’s first theorem.
DeMorgan-1 √õ∂Ô˜ ά◊¬Û¬Û±…1 ¬ı±À¬ı ˘øÊfl¬ ’±ªÓ«¬ ø‰¬S ’“±fl¬±º
(f) Differentiate between LAN and WAN.
LAN ’±1n WAN-1 ˜±Ê1 ¬Û±Ô«fl¬… À˙«±ª±º
(g) What is the role of a switch in a network ?
Network-Ó¬ switch ¤È¬±1 ˆ”¬ø˜fl¬± øfl¬ ∑
(h) Differentiate between static and dynamic allocation of memory.
Memory-1 static ’±1n∏ dynamic allocation-1 ˜±Ê1 ¬Û±Ô«fl¬… À˙«±ª±º
29T CSCA [3] Contd.
Page 4
(i) How are files in binary format different from files in text format in
C++ ?
C++ -1 text format-1 Ù¬±˝◊˘¸˜”˝ binary format-1 Ù¬±˝◊˘ ¸˜”˝Ó¬Õfl¬ øfl¬ˆ¬±À¬ı
¬Û‘Ôfl¬∑
(j) What is bandwidth ? How is it measured ?
Bandwidth øfl¬∑ ˝◊˚˛±fl¬ Œfl¬ÀÚÕfl¬ ŒÊ±‡± ˝˚˛∑
3. (a) Rewrite the following program after removing the syntatic error (s)
if any : 3
Ó¬˘1 √õ∂À¢∂˜ÀȬ±Ó¬ ˚ø øfl¬¬ı± ˆ≈¬˘ ’±ÀÂ√ ŒÓ¬ÀôL√ qÒ1±˝◊ ¬Û≈Ú1 ø˘‡± –
include <iostream.h>
class BUS
{ long Bus No;
char Description [30];
public
void Entry ( )
{ cin>>Bus No; gets (Description);
}
void Show ( )
{ cout<<Bus No<<‘‘:’’ << Description<< endl;
}
};
void main ( )
{ Bus B;
Entry.B ( );
Show.B ( );
}
29T CSCA [4]
Page 5
(b) Answer questions (i) and (ii) after going through the following code :
1+2=3
Ó¬˘1 code -ŒÈ¬± ø¬ıÀ¬ı‰¬Ú± fl¬ø1 (i) ’±1n∏ (ii) √õ∂ùü1 ά◊M 1 ø˘‡± :
class EXAM
{ int Rno, Total, Min, Marks;
public :
EXAM ( ) // FUNCTION 1
{ Rno = 201; Total = 100;
Min = 45; Marks = 75;
}
EXAM (int Trno, int Tmarks) // FUNCTION 2
{ Rno = Trno; Total = 100;
Min = 45; Marks = Tmarks;
}
~ EXAM ( ) // FUNCTION 3
{ cout << “EXAM ENDS” << endl;
}
void show ( ) // FUNCTION 4
{ cout << Rno << “: ” << Total <<“: ” << Min << endl;
cout << “[MARKS]” << Marks << endl ;
}
};
29T CSCA [5] Contd.
Page 6
(i) Which concept of Object Oriented programming is illustrated
by Funcion 1 and Function 2 together ?
Funcion 1 ’±1n∏ Function 2¬-¤ ¤Àfl¬˘À· object oriented
programming-1 Œfl¬±ÚÀȬ± Ò±1̱ ¬ı…±‡…± fl¬ø1ÀÂ√∑
(ii) What is Function 3 specifically referred as ? When will Function
3 be invoked ?
Function 3 fl¬ øÚø«©ÜÕfl¬ øfl¬ ¬ı≈ø˘ ά◊À~‡ fl¬1± Δ˝ÀÂ√∑ Function 3 Œfl¬øÓ¬˚˛±
invoke fl¬1± ˝í¬ı∑
(c) Write a C++ function to find the sum of diagonal elements from a
Two-dimensional array of type float. Use the array and its size as
parameter with float as its return type. 3
float type-1 ø¬Z˜±øSfl¬ ˙‘∫˘ ¤È¬±1 ¬Û1± fl¬Ì«1 Œ˜Ã˘¸˜”˝1 Œ˚±·Ù¬˘ ¬Û±¬ı1 ¬ı±À¬ı ¤È¬±
C++ Ù¬˘Ú ø˘‡±º ˙‘∫˘ÀȬ± ’±1n ˝◊˚˛±1 size parameter ø˝‰¬±À¬ı ¬ı…ª˝±1 fl¬ø1¬ı± ˚±ÀÓ¬
return type float ˝˚˛º
(d) Write an algorithm for the evaluation of POST FIX expression. 3
Post Fix expression-1 Ôfl¬± ˜±Ú øÚÌ«˚˛ fl¬1±1 ¬ı±À¬ı ¤È¬± algorithm ø˘‡±º
Or / ’Ô¬ı±
Write an algorithm for performing insertion in linked queue. 3
Linked queue -Ó¬ insertion ¸˜±Ò± fl¬1±1 ¬ı±À¬ı ¤È¬± algorithm ø˘‡±º
29T CSCA [6]
Page 7
(e) Explain the concept of Cartesian Product between two tables, with
the help of appropriate example. 1+2=3
≈‡Ú table-1 ˜±ÊÓ¬ Cartesian Product-1 Ò±1̱ÀȬ± ά◊¬Û˚≈Mê ά◊±˝1Ì1 ¸˝±˚˛Ó¬
¬ı…±‡…± fl¬1±º
Or / ’Ô¬ı±
Explain how SQL UNION operator works ? Give example. 3
SQL UNION operator-¤ Œfl¬ÀÚÀ1 fl¬±˚« fl¬À1 ¬ı…±‡…± fl¬1±º ά◊±˝1Ì ø¬ı±º
(f) Write an SQL command to create a table (employee) with the
following attributes : 1+2=3
Ó¬˘1 attribute ¸˜”˝ 1 Δ¸ÀÓ¬ ¤‡Ú table (employee) ¸‘ø©Ü fl¬1±1 ¬ı±À¬ı SQL
command ø˘‡± –
ecode integer
ename char (25)
grade char (2)
gross decimal
Set ecode as the primary key of the table. The attributes should not
allow NULL values. Ensure that values inserted for gross must be
greater that 1000.
ecode -ŒÈ¬± ¬table ‡Ú1 primary key ø˝‰¬±À¬Û set fl¬1±º Attribute ¸˜”À˝ NULL
value ¸˜”˝ allow fl¬ø1¬ı Ú±˘±À·º gross-1 ¬ı±À¬ı ’ôL√ˆ≈¬«Mê fl¬1± ˜±Ú ¸˜”˝ ˚±ÀÓ¬
1000-Ó¬Õfl¬ ά±„1 ˝˚˛ Œ¸˚˛± øÚøù‰¬Ó¬ fl¬1±º
29T CSCA [7] Contd.
Page 8
Or / ’Ô¬ı±
Explain UNIQUE, PRIMARY KEY and DEFAULT Constraints with
the help of examples.
UNIQUE, PRIMARY KEY ’±1n∏ DEFAULT Constraints ¬Î¬◊±˝1Ì1 ¸˝±˚˛Ó¬
¬ı…±‡…± fl¬1±º
(g) Draw the logic circuit diagram for the following expression : 3
Ó¬˘Ó¬ ø˚˛± 1±ø˙1 ¬ı±À¬ı ˘øÊfl¬ ’±ªÓ«¬ ø‰¬S ’“±fl¬± :
Y = ab + b c + c a
Or / ’Ô¬ı±
Write and prove the Absorption Law. 3
Absorption ¸”SÀȬ± ø˘‡± ’±1n∏ √õ∂˜±Ì fl¬1±º
(h) Verify the following algebraically : 3
¬ıœÊ·øÌÓ¬œ˚˛ˆ¬±Àª Ó¬˘1 1±ø˙ÀȬ± ¬Û1œé¬± fl¬1± :
(A' +B' ). (A + B ) = A'.B + A.B'
Or / ’Ô¬ı±
Reduce the following Boolean expression using K-Map : 3
K-Map ¬ı…ª˝±1 fl¬ø1 Ó¬˘1 Boolean ¬ı±ø˙ÀȬ± ¸—øé¬5fl¬1Ì fl¬1± –
F(P,Q,R,S) = Π (0,3,5,6,7,11,12,15)
(i) Explain any three network topologies for networks. 3
Network-1 ¬ı±À¬ı ø˚Àfl¬±ÀÚ± øÓ¬øÚ Ò1Ì1 network topologies ¬ı…±‡…± fl¬1±º
29T CSCA [8]
Page 9
Or / ’Ô¬ı±
Write the differences between GPRS and WLL. 3
WLL ’±1n∏ GPRS-1 ˜±Ê1 ¬Û±Ô«fl¬… ¸˜”˝ ø˘‡±º
4. Write a function in C++ to count the number of “He” or “She” words
present in a text file “STORY. TXT.” If the file “STORY.TXT” content is as
follows : 5
˚ø “STORY.TXT” file-1 content Ó¬˘Ó¬ ø˚˛± Ò1Ì1 ˝˚˛, ŒÓ¬øÓ¬˚˛± text file
“STORY.TXT” Ó¬ Ôfl¬± “He” ¬ı± “She” ˙s¸˜”˝ ·ÌÚ± fl¬ø1¬ı1 ¬ı±À¬ı ¤È¬± C++ Ù¬˘Ú
ø˘‡± –
“He is going to market. She is cooking in the kitchen”.
The output of the function should be as follows :
Ù¬˘ÚÀȬ±1 output Ó¬˘Ó¬ ø˚˛± Ò1Ì1 Œ˝±ª± ά◊ø‰¬Ó¬ –
COUNT OF He/She in file is 2
Or / ’Ô¬ı±
Write a program in C++ to exchange the positions of string stored in an
array using array of pointers. 5
Array of pointers ¬ı…ª˝±1 fl¬ø1 ˙‘∫˘ ¤È¬±Ó¬ store Δ˝ Ôfl¬± string-1 ¶ö±Ú¸˜”˝1 ¸±˘-
¸˘øÚ fl¬ø1¬ı1 ¬ı±À¬ı C++ Ó¬ ¤È¬± √õ∂À¢∂˜ ø˘‡±º
5. How does the access of inherited members depends upon their access
specifiers and the visibility modes of the base class ? Explain. 5
Inherited member ¸˜”˝ 1 access øfl¬À1 ø¸˝“Ó¬1 base class-1 access specifier ’±1n
visibility mode ¸˜”˝ 1 ›¬Û1Ó¬ øÚˆ«¬1 fl¬À1 ¬ı…±‡…± fl¬1±º
29T CSCA [9] Contd.
Page 10
Or / ’Ô¬ı±
What is constructor overloading ? Write a program in C++ to show
constructor overloading. 5
constructor overloading øfl¬∑ constructor overloading Œ‡≈ª±¬ı1 ¬ı±À¬ı C++ Ó¬
¤È¬± √õ∂À¢∂˜ ø˘‡±º
6. Define a class to represent batsmen in a cricket team. Include the following
members : 5
øSêÀfl¬È¬ ˘ ¤È¬±Ó¬ batsmen represent fl¬1±1 ¬ı±À¬ı ¤È¬± class define fl¬1±º Ó¬˘1
member ¸˜”˝ ’ôL√ˆ≈¬«Mê fl¬ø1¬ı± –
DATA MEMBERS :
FIRST NAME
LAST NAME
RUNS MADE
NUMBER OF FOURS
NUMBER OF SIXES
MEMBER FUNCTIONS :
(i) To assign the initial values.
(ii) To update runs made.
29T CSCA [10]
Page 11
(iii) To display batsman’s information.
Make appropriate assumptions about access labels.
Or / ’Ô¬ı±
What are static data members of a class ? Explain the characteristics of a
static data member.
Write a program in C++ to support your answer.
5
Class ¤È¬±1 static data member ¸˜”˝ øfl¬∑ static data member-1 Δ¬ıø˙©Ü…¸˜”˝
¬ı…±‡…± fl¬1±º ŒÓ¬±˜±1 ά◊M 1 ¸˜Ô«Ú fl¬1±Õfl¬ C++ Ó¬ ¤È¬± √õ∂À¢∂˜ ø˘‡±º
——— ×———
29T CSCA [11]
Page 12
29T CSCA [12] 4.5 +