TCS Papers: Sample Questions 348 - 349 of 502

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

Question number: 348

» Basic CS » Networks

Essay Question▾

Describe in Detail

What is RIP (Routing information protocol)?


  • Simple protocol to exchange information between the routers.

  • Defines a way for routers, which connect networks using the Internet Protocol (IP), to share information about how to route traffic among networks.

  • RIP, according to Internet Engineering Task Force (IETF) is an Interior Gateway Protocol (IGP), for moving traffic within a larger autonomous system- enterprise’s network with local area networks (LANs) linked through routers.

  • It is an Interior Gateway Protocol (IGP) to distribute routing information within an Autonomous System (AS).

  • Simple vector protocol with many implementations.

    • In vector protocol, routers exchange reachability information with only their nearest neighbors, communicating the sets of destinations they can reach, and the next hop to reach those destinations.

    • On the other hand, link-state IGPs exchange complete routes with one another- link state routers exchange topology information, and calculate their own complete routes locally.

Image of The RIP (Routing information protocol)

Image of the RIP (Routing Information Protocol)

Given the image is define the RIP (Routing information protocol)

Question number: 349

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

Write a function to swap the values of two integers.



  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int x=15y=20;
  5.     x=x+y;
  6.     y=x-y;
  7.     x=x-y;
  8.     printf(“After swapping : x=%dy=%d”, xy);
  9.     return 0;
  10. }
  • Output:

After swapping: x = 20, y = 15