Total Pageviews

Wednesday, 26 September 2012

Modem and Switches


One of the basic technical interview question:
Modem
A modem is adevice or program that enables acomputer to transmit dataover, for example, telephone or cable lines.There are different kinds of modems available in the market like LAN modem and Wifi Modems.




Switches


Switches are a fundamental part of most networks. Switches enable several users to send information over a network. Users can send the information at the same time and do not slow each other down. Just like routers allow different networks to communicate with each other, switches allow different nodes of a network to communicate directly with each other. A node is a network connection point, typically a computer. Switches allow the nodes to communicate in a smooth and efficient manner.

Routers

Routers are physical devices that join multiple wired or wireless networks together. Technically, a wired or wireless router is a Layer 3gateway, meaning that the wired/wireless router connects networks (as gateways do), and that the router operates at the network layer of the OSI model.

Basic difference between Router and Switch

A router is a more sophisticated network device than either a switch or a hub. Like hubs and switches, network routers are typically small, box-like pieces of equipment that multiple computers can connect to.
Each features a number of "ports" the front or back that provide the connection points for these computers, a connection for electric power, and a number of LED lights to display device status.
While routers, hubs and switches all share similar physical appearance, routers differ substantially in their inner working.

7 layers of Networking

    Interview questions in networks:

7 layers of Networking


Layer 1 PHYSICAL
Layer 2 DATA-LINK
Layer 3 NETWORK
Layer 4 TRANSPORT
Layer 5 SESSION
Layer 6 PRESENTATION
Layer 7 APPLICATION


The function of each layer:

Physical Layer -The physical layer is concerned with transmitting raw bits over a communication channel though hubs, wires (cat5UTP), modems, network cards… basically anything that is physical to the network.
THE DATA-LINK LAYER -The data link layer takes raw transmission and transform it into a line that appears free of transmission errors in the network layer
THE NETWORK LAYER -The network layer is concerned with controlling the operation of the subnet. A ROUTER is used to determining how packets are routed from source to destination
THE TRANSPORT LAYER -The transport layer “DIRECTS PACKETS”, splits it up into smaller units if need be, pass these to the network and ensure that the pieces are travelling in an orderly fashion.
THE SESSION LAYER -The session layer allows different machines to establish sessions between themselves
THE PRESENTATION LAYER -The Presentation Layer’s job is managing data restructures and converting from the representation used inside the computer to the network standard representation an visa versa
THE APPLICATION LAYER -The Application layer contains a variety of protocols that are commonly required. Another Application layer function is file transfer. Different file systems have different file naming conventions, different ways of representing text lines, and so on

Saturday, 22 September 2012

sizeof operator

We know that the sizeof(variable) returns the size of the variable and sizeof(pointer) returns the amount of memory that can be addressed  in bytes.

Try this program:


01
#include
02
#include
03
using namespace std;
04
void sz(int p[]){

05
   cout<<"sz: "<<sizeof(p)<<"\n";
06
}
07
int main(){
08
   int p[]={1,2,3,4};
09
   cout<<"main: "<<sizeof(p)<<"\n";
10
   sz(p);
11
   cout<<"main: "<<sizeof(p)<<"\n";
12
   cout<<"sizeof(p):"<<sizeof(p)<<"   sizeof(&p[0]):"<<sizeof(&p[0])<<"\n";
13
   return 0;
14
}

Output you get will be:

1
main: 16
2
sz: 8
3
main: 16
4
sizeof(p):16   sizeof(&p[0]):8


int p[4];
we know that p points to the first element in the array so the sizeof(p) should return the size of the memory being addressed, and so p is same as &p[0] and so sizeof(p) and sizeof(&p[0]) should be same.But that is not the case, sizeof(p) gives the sizeof the array in bytes i.e sizeof(int)*4 in this case.



Monday, 3 September 2012

google's fast internet


    





     Talking about any app or new website of Google.We talking about Google new launch 'World's Fastest Internet'.This time Google launches world's most fastest internet.This new services rocking whole world and will revolute the whole cyber world{hope so}.Chicago: Residents of community Kansas City will be having the worlds fastest internet that is available. Google announced on Thursday that its ultra-high speed internet service Google

Fiber, will be made available in Kansas City in September. Google gives an speed of one gigabit {1000mb} per second.Google said that this speed is 100 times more fastest that a
American use in its broadband.The reason of fasting internet is that instead of broadband Google Fiber is composed of thin optical fiber lines that run directly from a person's home to a data center. What Is The Downloading Speed ? Well this is the question appear in you
mind that what will be its actually downloading speed.I will tell you its real downloading speed.It will only take 3 second to download 100 photos compared to 4 minutes 40 seconds.3seconds to download 100 songs as compared to 5 minutes 28 seconds.And only take 7 seconds to download a High definition movies instead 10 minutes of using USA
high speed broadband Google Launches Additional Features Google also launches additional features with the internet service doubling the as TV package allowing many of high definition tv channels.And you can also record eight tv channels at same time with 2TB storage capacity What is The Cost For Google High Speed Service For enjoying Google highest speed {1000mb} per second you need to pay $70/ month and $120/month including TV package.But Google gives free services to Hospitals and Schools.