TCS Placement: Sample Questions 414 - 416 of 502

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 414

Edit

Describe in Detail

Essay▾

What is the minimum and maximum length of the header in the TCP segment and IP datagram?

Explanation

  • The header should have a minimum length of bytes and can have a maximum length of bytes.
Given the Image is Define the Transmission Control Protocol (TCP)
  • The TCP header consists of:
    • Minimum byte (5 words) of fixed-format info
    • Optional part (always an integer multiple of 4-bytes)
  • The TCP data has at most bytes data minus the options length (bytes)

    The second 20 comes from IP header

  • Thus any TCP segment can have at most bytes in total
  • However this number is usually severely limited by the network maximum transfer unit which is usually bytes.

Question 415

Edit

Write in Short

Short Answer▾

What number should be subtracted from each term of the ratio 17: 24 so that it becomes equal to 1: 2?

Explanation

  • The given ration is 17: 24 and we require it to be 1: 2
  • Our task is to find the number which needs to be subtracted from numerator and denominator both such that it becomes 1: 2.
  • Let the required number be x. Then,

  • So, required number is 10.

Question 416

Edit

Write in Short

Short Answer▾

What is a class in C ++ ?

Explanation

Class is a user defined data type, which holds its own data members and member functions, which can be accessed and used by creating instance of that class. The variables inside class definition are called as data members and the functions are called member functions. Its access is governed by the three access specifiers private, protected or public (by default access to members of a class is private) . A class (declared with keyword class) in C ++ differs from a structure (declared with keyword struct) as by default, members are private in a class while they are public in a structure. Instances of these data types are known as objects and can contain member variables, constants , member functions, and overloaded operators defined by the programmer.

Developed by: