3i Infotech Papers: Sample Questions 86 - 87 of 1245

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

Question number: 86

» Languages » C & C Plus Plus

MCQ▾

Question

In the following code segment what will be the result of the function value of x, value of y

  1. {
  2.     unsigned int x = -1;
  3.     int y;
  4.     y = ~0;
  5.     if (x = = y)
  6.     printf ( “same” );
  7.     else
  8.     printf ( “not same” );
  9. }

Choices

Choice (4) Response

a.

Same

b.

Not same

c.

Not same, MAXINT

d.

Same, MAXUNIT, MAXUNIT

Answer

a.

Explanation

  • In the program

Table showing the program

Table showing the program

unsigned int x =-1;

  • define the unsigned integer variable x=-1

int y;

  • define the integer variable y

y = ~0;

  • ~0 is the binary representation of -1

  1. if (x = = y)
  2. printf ( “same” );
  3. else
  4. printf ( “not same” );
  5. }
  • Check the if condition

  1. if (-1 = = -1)
  2. printf ( “same” );
  3. else
  4. printf ( “not same” );
  5. }
  • So the answer is same

Question number: 87

» Basic CS » Networks

Essay Question▾

Describe in Detail

What is virtual channel?

Explanation

Example of virtual channel

Example of Virtual Channel

Example of virtual channel

  • Virtual channel is point-to-point connection from one source to a destination but also allows multicast connections.

  • Established between two or more nodes through software applications.

  • Virtual channel protocol allows higher-levels to avoid complexities of dividing data into segments, packets, or frame.

Virtual Channel in ATM

  • The bandwidth of a virtual path is divided into separate virtual channel using a virtual channel identifier in the ATM header.

  • The ATM switches client connection and creates multiple circuits in a communication channel.