Saturday, 25 March 2017

exam tips

Question : Why main function is special in C++ ?
Answer : Whenever a C++ program is executed, execution of the program starts and ends at
main(). The main is the driver function of the program. If it is not present in a program, no
execution can take place.
Question : What is run-time error, logical error and syntax error?
Answer : Syntax error - the errors which are traced by the compiler during compilation, due to
wrong grammar for the language used in the program, are called syntax errors.
For example, cin >> a; // instead of extraction operator insertion operator is used.
Run time Error - The errors encountered during execution of the program, due to unexpected
input or output are called run-time error.
For example - a=n/0; // division by zero
Logical Error - These errors are encountered when the program does not give the desired output,
due to wrong logic of the program.
For example : remainder = a+b // instead of using % operator + operator is used.
Question : What is the role of #include directive in C++?
Answer : The preprocessor directive #include tells the complier to insert another file into your
source file. In effect, #include directive is replaced by the contents of the file indicated.
Question : What is compiler and linker?
Answer : Compiler - It is a program which converts the program written in a programming
language to a program in machine language.
Linker - It is a program which links a complied program to the necessary library routines, to
make it an executable program.
Question : Why is char often treated as integer data type in C++ ?
Answer : The memory implementation of char data type is in terms of the number code.
Therefore, it is said to be another integer data type.
Question : What is type conversation in C++ ?
Answer : When two operands of different data types are encountered in the same expression, the
variable of lower data type is automatically converted to the data tpes of variable with higher
data type, and then the expression is calculated.
For example: int a=98; float b=5; cout << a/3.0; //converts to float type, since 3.0 is of float type.
cout << a/b; // converts a temporarily to float type, since b is of float type, and gives the result
19.6.
Question : What is type casting in C++ ?
Answer : Type casting refers to the data type conversions specified by the programmer, as
opposed to the automatic type conversions. This can be done when the compiler does not do the
conversions automatically. Type casting can be done to higher or lower data type.
For example : cout << (float)12/5; //displays 2.4, since 12 is converted to float type.
Question : What is the effect of absence of break in switch case statement in C++ ?
Answer : The break keyword causes the entire switch statement to exit, and the control is passed
to statement following the switch.. case construct. Without break, the control passes to the
statements for the next case. The break statement is optional in switch..case construct.
Question : In a control structure switch-case what is the purpose of default in C++ ?
Answer : This keyword gives the switch…case construct a way to take an action if the value of
the switch variable does not match with any of the case constants. No break statement is
necessary after default case, since the control is already at the end of switch..case construct. The
default is optional in case of switch…case construct.
Question : What is the difference between while and do-while loop in C++ ?
Answer : While is an Entry Controlled Loop, the body of the loop may not execute even once if
the test expression evaluates to be false the first time, whereas in do..while, the loop is executed
at least once whether the condition holds true the first time or not.
Question : What is the difference between call by value and call by reference in a user defined
function in C++?
Answer : The value of the actual parameters in the calling function do not get affected when the
arguments are passed using call by value method, since actual and formal parameters have
different memory locations.
The values of the formal parameters affect the values of actual parameters in the calling function,
when the arguments are passed using call by reference method. This happens since the formal
parameters are not allocated any memory, but they refer to the memory locations of their
corresponding actual parameters
Question : What is preprocessor directive?
Answer : A preprocessor directive is an instruction to the complier itself. A part of compiler
called preprocessor deals with these directives, before real compilation process. # is used as
preprocessor directive in C++.
Question : What is the difference between local variable and global variable?
Answer : Local variables are those variables which are declared within a function or a
compound statement and these variables can only be used within that function/scope. They
cannot be accessed from outside the function or a scope of it‟s declaration. This means that we
can have variables with the same names in different functions/scope. Local variables are local to
the function/scope in which they are declared.
Global variables are those variables which are declared in the beginning of the program. They
are not declared within a function. So, these variables can be accessed by any function of the
program. So, global variables are global to all the functions of the program.
Question : What is the role of #define in C++?
Answer : It is a preprocessor directive to define a macro in a C++ program. Macros provide a
mechanism for token replacement with or without a set of formal, function line parameters. For
example :
#define PIE 3.1416
#define AVG(A,B,C) (A+B+C)/3
Question : What are the major differences between Object Oriented Programming and
Procedural Programming?
Object Oriented Programming Procedural Programming
Emphasis on data
Emphasis on doing things (function)
Follow bottom up approach in program
design
Follow top-down approach in program
design
Concept of Data hiding prevents accidental
change in the data
Due to presence of global variables, there is
possibilities of accidental change in data.
Polymorphism, inheritance, Data
Encapsulation possible

Not applicable

Thursday, 8 September 2016

1
LAN
LOCAL AREA NETWORK
2
MAN
METROPOLITAN AREA  NETWORK
3
WAN
WIDE AREA NETWORK
4
PAN
PERSONAL AREA NETWORK
5
WWW
WORLD WIDE WEB
6
HTTP
HYPER TEXT TRANSFER PROTOCOL
7
URL
UNIFROM RESOURCE LOCATOR
8
GSM
GLOBAL SERVICE FOR MOBILE COMMUNICATION
9
CDMA
CODE DIVISION MULTIPLE ACCESS
10
MODEM
MODULATOR DEMODULATOR
11
NIC
NETWROK INTERFACE CARD
12
PPP
POINT TO POINT PROTOCOL
13
SMTP
SIMPLE MAIL TRANSFER PROTOCOL
14
IMAP
INTERNET MAIL ACCESS PROTOCOL
15
VOIP
VOICE OVER INTERNET PROTOCOL
16
EDGE
ENHANCE DATA RATE FOR GLOBAL EVOLUTION
17
TCP
TRANSMISSION CONTROL PROTOCOL
18
IP
INTERNET PROTOCOL
18
SLIP
SERIAL LINE INTERNET PROTOCOL
19
FTP
FILE TRANSFER PROTOCOL
20
W3C
WORL WIDE WEB CONSORTIUM
21
ARPANET
ADVANCE RESEARCH PROJECT AGENCY NETWORK
22
NSF
NATIONAL SCIENCE FOUNDATION
23
POP
POST OFFICE PROTOCOL
24
NNTP
NETWORK NEWSS TRANSFER PROTOCOL
25
RJ 45
REGISTERED JACK
26
WLL
WIRELESS LOCAL LOOP
27
LCP
LINK CONTROL PROTOCOL
28
XML
EXTENSIBLE MARKUP LANGUAGE
29
HTML
HYPER TEXT TRANSFER PROTOCOL
30
DHTML
DYNAMIC HYPER TEXT MARKUP LANGUAGE
31
PHP
HYPER TEXT PROCESSOR
32
ASP
ACTIVE SERVER PAGE
33
JSP
JAVA SERVER PAGE
34
SMS
SHORT MESSAGE SERVICE
35
TDMA
TIME DIVISION MULTIPLE ACCESS
36
FLOSS
FREE  LIBRE OPEN SOURCE SOFTWARE
37
GNU
GROUP NOT UNIX
38
FSF
FREE SOFTWARE FOUNDATION
39
OSI
OPEN SOURCE INTITAIVE
40
SIM
SUBSCRIBER INFORMATION MODULE
41
WIFI
WIRELESS FIDELITY
42
IRC
INTERNET RELAY CHAT
43
SMSC
SHORT MESSAGE SERVICE CENTRE
44
E-MAIL
ELECTRONIC MAIL
45
UMTS
Universal Mobile Telecommunications System (UMTS)
46
IPR
INTELLECTUAL PROPERTY RIGHT
47
Bps
BYTES PER SECOND
48
FDDI
FIBRE DISTRIBUTED DATA INTERFACE
49
UTP
UN SHIELDED TWISTED PAIR
50
STP
SHIELDED TWISTED PAIR
51
GPRS
GENERAL PACKET RADIO SERVICE
52
GPS
GLOBAAL POSTIONING SYSTEM
53
ICMP
INTERNET CONTROL MESSAGE PROTOCOL
54
NFS
NETWORK FILE SYSTEM



Thursday, 4 August 2016

Notes Data Communication And networking

HTTP Full Form is Hypertext Transfer Protocol. It is the dada communication foundation for the World Wide Web (WWW)

The File Transfer Protocol (FTP) is a standard network protocol used to transfer computer files between a client and server on a computer network. 

 SMTP: Simple Mail Transfer Protocol, a protocol for sending e-mail messages between servers

IMAP (Internet Message Access Protocol) is a standard email protocol that stores email messages on a mail server, but allows the end user to view and manipulate the messages as though they were stored locally on the end user's computing device(s).

POP:- a protocol used to retrieve e-mail from a mail server. Most e-mail applications (sometimes called an e-mail client) use the POP protocol, although some can use the newer IMAP (Internet Message Access Protocol).

SLIP: SLIP is an Internet protocol that allows users to gain Internet access using a computer modem

PPP: Point-to-Point Protocol (PPP) is a data link (layer 2)protocol used to establish a direct connection between two nodes

TCP: TCP works with the Internet Protocol (IP), which defines how computers send packets of data to each other.

GSM: GSM (Global System for Mobile communications) is an open, digital cellular technology used for transmitting mobile voice and data services.

CDMA: CDMA is an example of multiple access, where several transmitters can send information simultaneously over a single communication channel. This allows several users to share a band of frequencies.

Difference between GSM and CDMA

  1. GSM is Narrow Band while CDMA is wide Band Technology
    2. GSM is time division(TDMA) while CDMA use Code DIVISION (CDMA)


TRANSMISSION MEDIUM:
Transmission medium is the means through which we send our data from one place to another. The first layer (physical layer) of Communication Networks OSI Seven layer model is dedicated to the transmission media,
Factors to be considered while choosing Transmission Medium
1.    Transmission Rate
2.    Cost and Ease of Installation
3.    Resistance to Environmental Conditions
4.    Distances

Speed
Bandwidth
Attenuation
Twisted pair

100-500 Mbps
high
Coaxial cable

10 Mbps
Moderate
Optical fibre

100 Mbps- 2Gbps
none

Repeater : In telecommunications, a repeater is an electronic device that receives a signal and retransmits it at a higher level or higher power, or onto the other side of an obstruction, so that the signal can cover longer distances.
Switch: A network switch is a computer networking device that connects devices together on a computer network,
Hub: A hub is a common connection point for devices in a network.
Difference between Switch and Hub

1. Hub is a dumb device while switch is smarter device than hub
2. Hub Broadcast the message in network which leads to traffic load while switch sends the packets to only desired desitination

Bridge: In telecommunication networks, a bridge is a product that connects a local area network (LAN) to another local area network that uses the same protocol .
Gateway : it is a device to connect two dissimilar network
Modem :- it is a device which converts analog signal to digital and vice versa
Modem may be of two types      1. Internal Modem    2. external Modem
NIC: Nic is Ethernet card which contains connection for twisted pair cable or co axial cable.
Router : A router is a networking device that forwards data packets between computer networks. Routers perform the "traffic directing" functions on the Internet
Topology :  a topology is a usually schematic description of the arrangement of a network, including its nodes and connecting lines. 
1.    Bus topology/linear topology
2.    Tree topology
3.    Ring topology
4.    Star topology
5.    Mesh topology
6.    Fully connected network.
ARPANET :- ARPANET is advanced research project agency network. It was first network developed by us defence. Late it was connected to NSF(National science foundation) which became Internet later.
Circuit Switching : With this type of switching technique, once a connection is established, a dedicated path exists between both ends until the connection is terminated.
Message  Switching: With message switching there is no need to establish a dedicated path between two stations. When a station sends a message, the destination address is appended to the message.
•     The entire message is then transmitted through the network, from node to node.
•     Each node receives the entire message, stores it , and then transmits the message to the next node.
•      This type of network is called a store-and-forward network.

Packets  Switching : In packet switching methods, a message is broken into small parts, called packets. Each packet is tagged with appropriate source and destination addresses. They do not necessarily travel together; they do not travel sequentially. They don't even all travel via the same route.But eventually they arrive at the right point and at their destination are reassembled into the correct order,

Cookies:- cookies are information sent by server to client computer to keep the track of work performed in client computers.

Firewall :- it is system designed to prevent unauthorized access to or from a private network. It can be implemented in both hardware and software.

Hacker:- hackers are programmer who break into the system for learning and joy purpose

Cracker: - crackers are malicious programmers who break into secure system with bad intention

Telnet:-telnet is service/utility which helps in remote login. With the help of telnet we can login into remote computer and can do the work as we are doing work in local computers

Proprietary software:- it is software which is neither  free  nor open. It belongs to some person/organization. To sue this software we have to purchase license by paying amount from its proprietor
ODF: - it is an open document format, based on XML generally used for saving and exchanging office documents.Protocol: - protocol is a set of rules which governs the flow of data in network

Protocol used for sending and receiving e-mail  are SMTP, IMAP

Protocol used to transfer e-mail from mail server to client computer is POP to read the e-mail offline

Topology: - topology refers to interconnection of nodes in network.

Examples of  free webservers         1. Apache tomcat  2) XAMP 3) My SQL Server  4)WAMP  5) LAMPExample of client side scripting language  1. Java scriptExample of client side scripting language  1. JSP  2. ASPVb script is example of both client side and server side scripting languageDifference between client side script and server side script


Client side
Server side
1.       Depends upon the efficiency of client computer
1.       Do not Depends upon the efficiency of client computer
2.       It is faster than server side as it executes on local machine,
2.  It is slower than clent side script as it executes in server
3.       Does not depend on the speed of network
3. Depend on speed of network
4.       Ex. Verification of data filled in form
4.  verification of password for login

Virus : it is a malicious programme viruses, which require an infected host file to spread,
Worms: worms are standalone software and do not require a host program or human help to propagate. Worms can replicate themselves
Trojan horse: The Trojan Horse, at first glance will appear to be useful software but will actually do damage once installed or run on your computer
Trojans are also known to create a backdoor on your computer that gives malicious users access to your system, possibly allowing confidential or personal information to be compromised. Unlike viruses and worms, Trojans do not reproduce by infecting other files nor do they self-replicate.
Computer worms are similar to viruses in that they replicate functional copies of themselves and can cause the same type of damage. In contrast to viruses, which require the spreading of an infected host file, worms are standalone software and do not require a host program or human help to propagate.

Open-source software (OSS) is computer software with its source code made available with a license in which the copyright holder provides the rights to study, change, and distribute the software to anyone and for any purpose.
GNU LINUX, LIBRE OFFICE
Free software: Free software is software that gives you the user the freedom to share, study and modify it. 
·         Freedom 0: The freedom to run the program for any purpose.
·         Freedom 1: The freedom to study how the program works, and change it to make it do what you wish.
·         Freedom 2: The freedom to redistribute and make copies so you can help your neighbor.
·         Freedom 3: The freedom to improve the program, and release your improvements (and modified versions in general) to the public, so that the whole community benefits
Ex:- GNU, Apache, Mozila
Freeware is copyrighted computer software which is made available for use free of charge, for an unlimited time. Authors of freeware often want to "give something to the community", but also want to retain control of any future development of the software.
Shareware:-  software that is available free of charge and often distributed informally for evaluation, after which a fee may be requested for continued use. Ex  Adobe , winzip, internet download manager
Freeware
Shareware
Freeware refers to software that anyone can download from the Internet and use for free
Sharewares give users a chance to try the software before buying it.
All the features are free.
Most of the times, all features are not available, or have limited use. To use all the features of the software, user has to purchase the software.
Freeware programs can be distributed free of cost
Shareware may or may not be distributed freely. In many cases, author’s permission is needed, to distribute the shareware.
Adobe PDF, Google Talk, yahoo messenger, MSN messenger
Winzip, winrar, RECUVA data recovery software




4 marks question from data communication and networking
Following question may be asked  for 1 marks each
  1. Draw the best possible layout/ layout’s for the given details (no of computers in each department and distance between different department)
  2. To place the server in most suitable place
  3. To place the switch/hub and repeater in different department
  4. Best suitable medium either guided(wired) or unguided(wirelesee)
  5. Types of network used in connecting the departments
  6. Types of link to create line between different department

Trick to solve the questions

1.       To draw best layout

Suppose distance between department A,B,C and d is as follows
A -B
40

NAME OF DEPT
NO OF COMPUTER
A – C
35
A
45
B - C
60
B
50
B – D
70
C
30
 C- D
45
D
100
A –D
20




STEP 1; select the group which has minimum distance
Here is A –D
DRAW ACONNECTION BETWEEN A-D
A                    D
NOW SEARCH  MINIMUM DISTANCE FROM REST GROUP HAVING ‘A’ OR  ‘D’
FROM BOTH 35 IS MINIMUM HENCE TAKE THIS GROup

IF WE SEE HAVING GROUP D THEN(B-D 70, C- D 45) MIN IS 45
NOW CONNECTION WILL BE
C                                     A                             D
NOW ONLY B IS LEFT SEARCH MINIMUM DISTANCE FROM GROUP  HAVING B
(A –B, 40 B-C ,60) MIN IS 40 NOW CONNECT B FROM A NOW DIAGRAM WILL BE

(DONT FORGET TO  WRITE THE  CONCERNED DISTANCE IN ARRAOW MARK
1.       TO PLACE THE SERVER IS MOST Easy question
Server should be placed where the number of computers is maximum
Here most suitable place will be  ‘D’
2.       To place switch/Hub and repeater
Switch/hub should be placed in each department as it is used connect compute in local network, repeater can be used here distance between two department is near about hundred
In this example no repeater is required
3.       Types of network
Distance which can be considered under lan is 100mtrs
Distance within a city  can be considered under MAN
Accept above two all other connection will be considered as WAN

4.       To use of medium
Wired media
If speed does not matter and cost is to be minimized use twisted pair cable
If we need optimum performance then use co-axial cable
If cost does not matter and high speed is required use optical fibre
Wireless connection
Small plane area  use microwave
Small hilly area use radio wave
If distance is more use satellite communication

5.       To link between department/types of internet connection
1.       For low speed  dial up connection
2.       For high speed link use Broad band connection
Important questions:
1)      Write difference between GSM and CDMA
2)      Write difference between HTML And DHTML
3)      What is client side scripting and server side  scripting?
4)      Write example of client side script and server side script
5)      What is web 2.0
6)      Write example of open source  web server
7)      What is bandwidth?
8)      Write about evolution of internet