TCS Papers: Sample Questions 320 - 321 of 502

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

Question number: 320

» Basic CS » Networks

Essay Question▾

Describe in Detail

What are the responsibilities of Transport Layer?


The Transport Layer is responsible for source-to-destination delivery of the entire message. It provides following functions:

  • Service-point Addressing

    • Transport Layer header includes service point address that is a port address.

    • This layer gets the message to the correct process on the computer unlike Network Layer, which gets each packet to the correct computer.

  • Segmentation and reassembly

    • A message is divided into segments; each segment contains sequence number, which enables this layer in reassembling the message.

    • Message is reassembled correctly upon arrival at the destination and replaces packets lost in transmission.

  • Connection Control

    • It includes 2 types:

    • Connectionless Transport Layer: Each segment is considered an independent packet delivered to the transport layer at the destination machine.

    • Connection Oriented Transport Layer: Before delivering packets, connection is made with transport layer at the destination machine.

  • Flow Control

    This layer performs end-to-end flow control.

  • Error Control

    • This layer performs end-to-end error correction to ensure complete message at the receiving transport layer.

    • Error correction is done through retransmission.

Question number: 321

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

Can I use “int” data type to store the value 32768? Why?


  • No. “Int” data type is capable of storing values from -32768 to 32767.

  • 32768 can be used as “long int” instead.

  • “unsigned int” can also be used if negative values are not to be used.

  • C compiler will not throw any error when 32768 is assigned to an integer type variable. But the actual value in that integer type variable will be -32768.

  • In C programming language the range or size of integer data type is circular- a value greater than 32767, is automatically converted to next value that’s, -32768.

  • A value less than -32768 is automatically converted to the next value: 32767.