Theory 2014
Theory 2014
THEORY QUESTIONS
CHAPTER NAME : STRUCTURES
1. Define a structure.
Ans. A structure is a collection of variables of different data types which are
referred under one common name.
It can access the private members of Cannot access the private members of
the class. the class.
13.Why it is a bad idea to declare the data members of a class under the public
category ?
Ans. It is because the data members contain the information which has to be
protected from outside and data abstraction to be retained in the program.
1. Define constructor.
Ans. A constructor is a member function which has the same name as that of the
class and is used for initializing the data members with initial values.
8. What is destructor ?
Ans. It is used for destroying objects created by the constructor.
12. Give the order of constructor and destructor invocation in a nested class.
Ans. First the constructors of the classes used inside a class will be called and the
class’s constructor. Destructor invocation is just the opposite of the constructor
invocation.
(ii) protected - private members are inherited but they cannot be accessed by
the derived class directly.
Protected and public members of the base class goes as the protected members
of the derived class.
(iii) public - private members are inherited but they cannot be accessed by the
derived class directly.
Protected and public members of the base class goes as the protected and public
members of the derived class.
class A
{
int a;
public :
A(int x)
{
a=x;
}
};
class B :public A
{
int b;
public :
B(int x,int y):A(x)
{
b=y;
}
};
class B
{int y;
public :
B(int);
};
class C
{
A a1;
B b1;
public :
C(int m,int n):a1(m),b1(n)
{
}
};
1. Define a file.
Ans. It is a collection of related information.
2. What is a stream ?
Ans. It is a collection of bytes.
3. Name the streams associated with file related operations.
Ans. Input stream and output stream.
4. Name the stream classes associated with file related operations.
Ans. ifstream, ofstream and fstream.
5. Which header file is used for file related operations ?
Ans. fstream.h
16. What operator is used for referencing structure elements using structure pointer
?
Ans. structure elements are accessed using structure pointer followed by the ->
operator.
4. What is a Stack ?
Ans. Stack is a collection of elements in which it follows the mechanism of Last In
First Out (LIFO). Insertion or deletion of an element takes place at only one point
which is the top position.
5. What is a Queue ?
Ans. Queue is a collection of elements in which it follows the mechanism of First In
First Out (FIFO). Insertion takes place at the rear end and deletion takes place at
the front end.
10.Give the formula for calculating the address of an element in row-major and
column-major form.
Ans. Row – major form :
Address of the A[i][j]element = BA + ES [n[i-l1] +[j-l2]]
Column-major form :
Address of the A[i][j] element = BA + ES [[i-l1] +m[j-l2]]
BA – Base Address, ES – Element Size , n-no. of columns in the array , l1-lower
bound of row, m - no. of rows in the array, l2 – lower bound of column.
1. What is a database ?
Ans. A database is a collection of related data.
2. List out the advantages of database.
Ans. 1. Data redundancy – duplication of data is avoided.
2.Data consistency – ensuring correct values are entered by the user.
3. Sharing of data – because of the usage by many users.
4. Enforcing standards - to have a proper way of communication
5. Data Security – to prevent unauthorized access.
6. Data Integrity – to check in the related records in the database.
8. Define the following terms : (i) relation (ii) attribute (iii) tuple (iv) cardinality
(v) degree
Ans. (i) relation – it is a table in which the data are organize in rows and columns.
(ii) attribute – a column or field in a relation.
(iii) tuple – a row or record in a relation.
(iv) cardinality – no. of tuples in a relation.
(v)degree – no. of attributes in a relation.
9. Define the terms : (i) primary key (ii) candidate key (iii) alternate key (iv)
foreign key.
Ans. (i) primary key – it is a set of one or more attributes that identifies a tuple in a
relation. It contains unique and not null values.
(ii) candidate key – all attributes which qualifies to become a primary key.
(iii) alternate key – A candidate key that is not the primary key.
(iv) foreign key – A primary key of one relation if used in other relation it becomes
the foreign key of that relation.
3. What is a constraint ?
Ans. It is a condition to check on a field/attribute.
9. What is a view ?
Ans. View is the virtual table created from the existing base table for display
purposes.
1. Define a network.
Ans. A network is an interconnected collection of autonomous computers.
5. What is a node ?
Ans. A node is the computer attached to the network. It is also called as
workstation, terminal. It seeks to share the resources of the network.
6. What is a server ?
Ans. The main computer which facilitates the sharing of data, software and
hardware on the network is called a server.
(ii) non-dedicated server – The system on the network which plays the dual role of
the server and the workstation is called as non-dedicated server. The network using
such servers are called Peer-to-Peer Network.
8. What is NIU ?
NIU is Network Interface Unit is a device attached to each of the
workstations and the server. It helps the workstation establish all connection
with the network.
Each NIU attached to the workstation has a unique address .The NIU
manufacturer assigns a unique physical address to each NIU. This physical
address is called as MAC Address. MAC Address is Media Access Control
Address.
NIU is also called as TAP (Terminal Access Point) or NIC (Network
Interface Card).
11. Explain the switching techniques Or Differentiate between any of the switching
techniques.
Ans. (i) Circuit switching – The physical connection is established between the
source and the destination computer and then the datas are transmitted. It is used
when end-to-end path between the computers is needed.
(ii) Message switching – It uses the technique of store and forward. The data are
sent from the source computer to the switching office and then to the destination
computers. In this technique the data are stored in the disk. There is no limit on the
block size of the data.
(iii) Packet switching – The data is divided into different packets in this technique.
Packet means the datas are divided into byte format. All the packets of fixed size are
stored in the main memory. It places a tight upper limit on the block size.
Disadvantages :
1. It is incapable of carrying a signal over long distances without using the
repeaters.
2. It supports maximum data rates of 1 Mbps without conditioning to 10 Mbps with
conditioning.
Disadvantages :
1. Expensive when compared to twisted pair.
2. It is not compatible with twisted pair.
23. List out the advantages and disadvantages of fibre optic cable .
Ans. Advantages :
1. It is immune to interference either magnetic or electrical.
2. It supports secured transmission and a very high transmission capacity.
Disadvantages :
1. Installation is very hard.
2. They are most expensive.
Disadvantages :
1. It is an insecure communication.
2. The cost of design, implementation and maintenance is high.
LAN WAN
Diameter is not more than a few Span across countries and continents.
kilometers
Very low error rates Higher error rates.
38. What is star topology ? List out the advantage and disadvantage of it.
Ans. Star topology consists of a central node to which all other nodes are connected.
Advantage :
1. Centralized control 2. One device per connection – failure of one node will
not affect the network.
Disadvantage :
1. Long cable length 2. Central node dependency.
39.What is bus topology ? List out the advantage and disadvantage of it.
Ans. It is linear topology which consists of a single length of the transmission
medium onto which the various nodes are connected. The bus has terminators at
both the ends which absorb the signal, removing it from the bus.
Advantage :
1. Short cable length 2. Resilient architecture – means which has a single
cable through which all the datas are transmitted.
Disadvantage :
1. Fault diagnosis is difficult 2. Fault isolation is difficult – if a node is not
working in the bus it has to be rectified at the point where the node is connected.
40.What is ring topology ? List out the advantage and disadvantage of it.
Ans. Nodes are connected in a circular fashion. The data can be transmitted in only
one direction.
Advantage :
1. Short cable length. 2. No wiring closet space is required – Since there is
only one cable connecting each node to its neighbouring node, no separate space
is allocated for wiring.
Disadvantage :
1. Node failure causes network failure. 2. Difficult to diagnose faults.
45.What is RJ-45 ?
Ans. RJ-45 is Registered Jack -45. It is an eight-wire connector, which is commonly
used to connect computers on the local area networks.
48.What is a switch ?
Ans. A switch is a device that is used to segment networks into different
subnetworks called subnets or LAN segments. It prevents the traffic overloading in a
network. It can filter traffic in the network.
49.What is a repeater ?
Ans. A repeater is a device which is used to amplify the signals being transmitted in
a network.
50.What is a bridge ?
Ans. A bridge is a network device that connects two similar networks which supports
the same protocol.
51.What is a router ?
Ans. A router is a network device that connects networks which supports different
protocols.
55.What is Datagram ?
Ans. A Datagram is a collection of the data that is sent as a single message.
58.What is GSM ?
Ans. GSM stands for Global System for Mobile Communications. In covered areas,
cell-phone users can buy one phone that will work anywhere where the standard is
supported. GSM users simply switch SIM cards. (Subscriber Identification Module).
GSM uses narrowband TDMA, which allows eight simultaneous calls on the same
radio frequency.
59.What is TDMA ?
Ans. TDMA means Time Division Multiple Access is a technology which works on
dividing a radio frequency into time slots and then allocating slots to multiple calls.
60.What is SIM ?
Ans. SIM stands for Subscriber Identification Module which is a chip that gives a
cellular device a unique phone number. It has the memory, the processor and the
ability to interact with the user. Current SIMs have 16 to 64 kb of memory.
61.What is CDMA ?
Ans. CDMA stands for Code Division Multiple Access is a technology which uses a
spread spectrum technique where the data is sent in small pieces over a number of
discrete frequencies available for use. Each user’s signal is spread over the entire
bandwidth by unique spreading code and at the receiver end the same unique code
is used to recover the signal.
65.Define SMS.
Ans. SMS – Short Message Service is the transmission of short text messages to and
from a mobile phone, fax machine and/or IP address.
67.What is e-mail ?
Ans. E-mail is Electronic mail is sending and receiving messages by the computer.
70.What is chat ?
Ans. Online textual talk in real time is called chatting.
71.What is video-conferencing ?
Ans. A two-way videophone conversation among multiple participants is called
video- conferencing. Eg. Microsoft NetMeeting is the software which supports video-
conferencing.
(ii) URL – Uniform Resource Locator is the distinct address for each resource on the
internet, which acts a pointer to information on the WWW.
(iii)Domain Name – The characters based naming system by which servers are
identified is known as Domain Naming system. Eg. .com, .gov, .edu
(iv) Telnet – is an internet utility that let us log onto remote computer
systems.
(v) Web browser – It is software which the WWW client that navigates through the
World Wide Web and displays Web pages.
(vi) Web Server – It is a WWW server which responds to the requests made
by the Web browser.
(vii) Web site – is a collection of web pages.
(viii) Web page – The documents residing on web sites are called web pages.
(ix) Web Hosting – is a means of hosting web-server application on a computer
system through which electronic content on the internet is readily available
to any web-browser client.
(iii)DHTML – Dynamic Hyper Text Markup Language – The language which uses the
combinations of HTML, style sheets and scripts that allows documents to be
animated.
(iii) Web Scripting : the process of creating and embedding scripts in a web
page is known as web scripting.
77. List out the criteria for distributing open source software.
Ans. (i) Free redistribution (ii) Source code (iii) Derived works (iv) Integrity of the
Author’s Source code (v) No discrimination against persons or groups (vi) No
discrimination against fields of endeavor (vii) Distribution of License (viii) License
must not be specific to a product (ix) The license must not restrict other software
(x) License must be technology neutral.
79.What is GNU ?
Ans. GNU refers to GNU’s Not Unix. It emphasizes on freedom and thus its logotype
is an animal living in freedom. It was initiated by Richard M. Stallman with an
objective to create a system compatible to Unix but not identical with it. Now, it
offers a wide range of software, including applications apart from OS.
80.What is FSF ?
Ans. FSF stands for Free Software Foundation is a non-profit organization created for
the purpose of supporting free software movement.
81.Explain OSI.
Ans. OSI is Open Source Initiative is an organization dedicated to cause of
promoting open source software.
82.What is W3C ?
Ans. W3C is an acronym for World Wide Web Consortium which is responsible for
producing the software standards for the world wide web.
85.What is Shareware ?
Ans. Shareware is a software, which is made available with the right to redistribute
copies, but it is limited ie. If one intends to use the software after a certain period of
time, a license fee should be paid. Source code is not available and the modifications
cannot be made.
86. What are the problems encountered under network security ?
Ans. It can be classified as (i) Physical Security holes
(ii) Software security holes (iii) Inconsistent Usage holes
87. What are the protection methods followed to secure the network ?
Ans. (i) Authorization – login-id
(ii) Authentication – password-protection
(iii)Encrypted Smart Cards – It is a hand held card that can generate a token that a
computer can recognize. Everytime a new and different token is generated.
(iv) Biometric systems – finger-prints
(v) Firewall – It is a system designed to prevent unauthorized access to or from a
private network. It can be implemented in both hardware and software.
93.What is IPR ?
Ans. The Intellectual Property may be defined as a product of the intellect that has
commercial value, including copyrighted property such as literary or artistic works
and ideational property.
94.What is a Computer Virus ?
Ans. Computer virus is a malicious program that requires a host and is designed to
make a system sick.
97.What is a worm ?
Ans. A worm is a program designed to replicate.
98.What is SPAM ?
Ans. SPAM refers to electronic junk mail or junk newsgroup postings. It is the
unsolicited usually commercial e-mail sent to a large number of addresses.