TCS Papers: Sample Questions 298 - 299 of 502

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 298

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

How to reduce a final size of executable?

Explanation

To reduce the final size of executable:

  • Remove any dead code

  • Refactor common code to functions where ever possible

  • Use dynamic linking for libraries.

Question number: 299

» Basic CS » Networks

Essay Question▾

Describe in Detail

What are the different types of networking/internetworking devices?

Explanation

Repeater

  • An electronic device that operates only at physical layer. Receives signal in the network before it becomes weak, regenerates the original bit pattern and puts the refreshed copy back into the link.

  • A repeater increases the length of the network by eliminating the effect of signal attenuation.

  • Connects two segments of the same network, overcoming the distance limitations of the transmission media.

  • A repeater forwards every frame, it has no filtering capability.

  • A repeater is a generator, not an amplifier.

  • Repeaters can connect segments that have the same access method.

Image shows the Repeater

Image Shows the Repeater

Given the image is define the function of repeater

Bridges

  • Bridges limit or filter traffic keeping local traffic local yet allowing connectivity to other subnets.

  • Operate both in the physical and data link layers of LANs of same type.

  • Divide a larger network into smaller segments.

  • Keep traffic for each segment separate and thus are act as repeaters that relay a frame only the side of the segment containing the intended recipient and hence control congestion.

  • A bridge does this based on a table used in filtering decisions. Checks the destination address of a frame and decides if the frame should be forwarded or dropped. If the frame is to be forwarded a bridge has a table that maps address to ports.

 Image shows the bridge

Image Shows the Bridge

Given the image is defining the bridge.

Routers

  • Relay packets among multiple interconnected networks (i. e. LANs of different type).

  • Operate in the physical, data link and network layers.

  • Determine which of the several possible paths is best for a particular transmission.

  • Routers route packets based on their logical addresses using a routing table for making decision about the route.

  • Router can increase network efficiency by filtering out broadcast traffic between networks, thus reducing unnecessary traffic between networks.

Image shows the router

Image Shows the Router

Given the image is defining the routers in an internet.

Gateways

  • Relay packets among networks that have different protocols (e. g. between a LAN and a WAN).

  • Accept packet formatted for one protocol and convert it to a packet formatted for another protocol before forwarding it.

  • They operate in all seven layers of the OSI model.

  • For example, gateways translate different electronics mail protocols and convey email across the internet.

Image shows the gateway

Image Shows the Gateway

Given the image is define the gateways