TCS Papers: Sample Questions 423 - 424 of 502

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

Question number: 423

» Languages » C & C Plus Plus

MCQ▾

Question

When are the global objects destroyed?

Choices

Choice (4) Response

a.

When the program terminates.

b.

As soon as local objects die.

c.

When the control comes out of the function in which they are being used.

d.

When the control comes out of the block in which they are being used.

Answer

a.

Explanation

  • Global variables exist for the whole program- when program terminates than global variables is destroyed.

  • Object outside all function bodies is known as global object.

  • Objects of classes outside any functions can be declared from anywhere in the program.

  • Such objects are globally available to all the function in the program.

  • Example:

  1. Class sample
  2. {
  3.     Int x;
  4.     Publicvoid readx() { cin>>x;}
  5. };
  6. Sample s1// global object
  7. Void main()
  8. {
  9.     Sample s2//local object
  10.     S1.readx();
  11. }

Question number: 424

» Basic CS » Networks

Essay Question▾

Describe in Detail

Explain rule

Explanation

  • The rule is a guideline for design of shared Ethernet networks for optimal traffic flow- refers to the number of repeaters and segments present on shared Ethernet backbones for tree topology.

  • It means that between any two points on the network, there can be no more than five network segments or four repeaters, and of those five segments only three of segments can be populated.

  • The rule comes because each repeater and segment adds a delay in the process and Ethernet protocol dictates that packets reach every part on its path toward its destination within a specified length of time.

  • mbps Ethernet could be used on no more than network segments, repeaters, and no more than of the five network segments can be for end users.

5-4-3 rule in image

5 - 4-3 Rule in Image

Given the image is define the Ethernet 5 - 4-3 rule