0% found this document useful (0 votes)
113 views6 pages

Qestion Paper

The document contains questions about programming concepts like syntax errors, functions, outputs of code segments, and algorithms. It also includes questions on data structures, Boolean logic, databases, and computer networks. Specific topics covered include arrays, stacks, queues, binary search, insertion sort, SQL, protocols, topologies, and suggestions for networking an educational institute across multiple buildings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views6 pages

Qestion Paper

The document contains questions about programming concepts like syntax errors, functions, outputs of code segments, and algorithms. It also includes questions on data structures, Boolean logic, databases, and computer networks. Specific topics covered include arrays, stacks, queues, binary search, insertion sort, SQL, protocols, topologies, and suggestions for networking an educational institute across multiple buildings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1.

a)Identify the syntax errors, if any , in the following program. Also, give reason for errors. 2M

void main()
{
const int i=20;
const int *const ptr=&i;
(*ptr)++;
int j=15;
ptr=&j;
}

b)Write a function COUNT_TO() in c++ to count the presence of a word "To" in a text file
"NOTES.TXT". 3M
if the content of the file "NOTES.TXT" is as:
It is very important to know that
Smoking is injurious to health
Let us take initiative to stop it
the function COUNT_TO will display the following message:
Count of -to- in file :3

c)Give the output of the following program segment.( Assume, all required header files are included
in the program.) 3M

void main()
{
char *s="GOODLUCK";
for(int x=strlen(s)-1;x>=0;x--)
{
for(int y=0;y<=x;y++)
cout <<s[y];
cout<<endl;
}
}
d) Give the output of the following program : 2M

#include<iostream.h>
int main()
{ int a=32,*ptr=&a;
char ch='A', &cho=ch;
cho+=a;*ptr+=ch;
cout<<a<<" "<<ch<<endl;
return 0;
}

2.

a) Find the output of the following C++ code considering that the binary file GAME.DAT exist on the
hard disk with information of 200 games. 1M
class GAME
{
int Gno; char GName[20];
public:
void GetIn(); void ShowName();
};
void main()
{
fstream GF;
GF.open("GAME.DAT",ios::binary|ios::in);
GAME G;
GF.seekg(sizeof(G)*5);
GF.read((char*)&G, sizeof(G));
GF.read((char*)&G, sizeof(G));
int RECORDNO-GF.tellg()/sizeof(G);
cout<<"RECORDNO:"<<RECORDNO<<endl;
GF.close();
}
b)An array G[50][20] is stored in the memory along the row with each of the element occupying 8
bytes . Find out the memory location for the element G[10][15], if G[0][0] is stored at 4200 3M

or

b)Write an algorithm for traversal in array 3M

c)Write the equivalent infix expression for 10,3,*,7,1,-,*,23,+ in a tabular form. 3M

d)Write an algorithm for insertion in a circular queue 3M

or

d)Write an algorithm for Popping from array stack 3M

3.

a)Write a function POPBOOK() in c++ to perform delete operation from a dynamic stack, Which
contains Bno an Title. Consider the following definition of NODE, while writing your C++ code. 4M

struct NODE
{
int Bno
char Title[20];
NODE *Link;
};
(OR)
a)Convert the following infix expression to its equivalent postfix expression, showing the stack
contents for each step for conversion
(X/Y+U*(V-W))
b) What do you understand by primary key? Give a suitable example of primary key from a table
containing some meaningful data. 2M
(OR)
b)Explain the concept of candidate keys with the help of an appropriate example.

c)Write the SOP form of Boolean function F, which is represented in a truth table as follows 1M

X Y Z F
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
(OR)
c)Define principle of duality

d)Verify the following using Boolean laws: 3M

U  V  U .V  UV
.  U .V

(OR)
d) Draw the logic circuit for the following Boolean expression
(U  V ).(W  Z )

4.

a)Obtain the minimal form for the following boolean expression using karnaugh's Map:
F ( A, B, C , D)  (1,3, 4,5, 6, 7,12,13) 3M
(OR)
a)Reduce the following boolean expression using K-Map:
F ( A, B, C , D)   (0,1, 2, 4,5, 6,8,10)

b)State and prove DeMorgan's laws in boolean algebra 3M


(OR)
b)State distributive law and verify it using a truth table

c)What is this pointer ? Give an example to illustrate the use of it in C++. 3M


(OR)
c)Differentiate between static and dynamic memory allocation of memory.

d)Define datastructure 1M
(OR)
d)Define Cordinality
5.

a) Explain the binary search algorithm 4M

b)Write an algorithm for deletion in an array 3M

c)Explain insertion sort algorithm 3M

6.

a)What are the various levels of database implementation 2M

b) Consider the following tables SCHOOL and ADMIN and answer (a) and (b) parts of the question

6M
Table SCHOOL
Code TeacherName Subject DOJ Periods Experience
1001 Ravi Shanker English 12/03/2000 24 10
1009 Priya Rai Physics 03/09/1998 26 12
1203 Lisa Anand English 09/04/2000 27 5
1045 Yashraj Maths 24/08/2000 24 15
1123 Ganan Physics 16/07/1999 28 3
1167 Harish B Chemistry 19/10/1999 27 5
1215 Umesh Physics 11/05/1998 22 16

Table ADMIN
Code Gender Designation
1001 Male Vice Principal
1009 Female Coordinator
1203 Female Coordinator
1045 Male HOD
1123 Male Senior Teacher
1167 Male Senior Teacher
1215 Male HOD

A.Write the Sql Statement s for the following

(i)To display TEACHERNAME,PERIODS of all the teachers whose periods are more than 25.

(ii)To display all the information from the table SCHOOL in descending order of Experience.

(iii)To display TEACHERNAME ,CODE and corresponding DESIGNATION from tables SCHOOL and
ADMIN of male teachers.

(iv)To display DESIGNATION without duplicate entries from the table ADMIN.

B.Give the output of the following SQL queries:

(i) SELECT DESIGNATION, COUNT (*) FROM ADMIN GROUP BY DESIGNATION HAVING COUNT(*)<2;
(ii) SELECT MAX (EXPERIENCE) FROM SCHOOL;

(iii)SELECT TEACHERNAME FROM SCHOOL WHERE EXPERIENCE >12 ORDER BY TEACHERNAME;

(iv) SELECT COUNT(*) ,GENDER FROM ADMIN GROUP BY GENDER;

c) Define constraint and write about the sql constraints 2M

7.

a) Expand the following 1M

(i) GPRS (ii) CDMA (iii) GSM

b)What is a protocol? Which protocol is used to copy a file from/to a remote server? 1M

c)What do you mean by network topology? What are the most popular topologies? 2M

d)Differentiate between PAN and LAN types of network? 2M

e)Institute of Distance Learning located in Pune and is planning to go in for networking for four
wings for better interaction . The details are shown below: 4M

The distance between various wings

Student Wing to admin wing 150m

Student wing to admission wing 100m

Student wing of lib wing 320

Admission wing to admin wing 100m

Admission wing to lib wing 125m

Admin wing admin wing 90m

Number of computers

Student wing 225

Admission wing 50

Admin wing 10

Lib wing 25
a) Suggest the type of networking (LAN,MAN,WAN)for connecting Lib Wing to Admin Wing , Justify
your answer

b)Suggest the most suitable place (i.e. wing)to house the server, with a suitable reason.

c)Suggest and placement of the following device with reasons

a)Repeater b)Switch

d)The Institute is placing to link its study centre situated in Delhi. Suggest an economic way to
connect it with reasonably high speed .Justify your answer .

You might also like