3i Infotech Papers: Sample Questions 840 - 842 of 1245

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

Question number: 840

» Basic CS » Networks

Essay Question▾

Describe in Detail

What is the header length of Ether Net MAC?

Explanation

Image of the Ether Net MAC

Image of the Ether Net MAC

Image of the Ether Net MAC

The basic MAC data frame format for Ethernet used within the 10 and 100 Mbps systems is given above.

Mac header has following fields:

  • The first two fields are 6-byte source and destination address.

  • The last field is the 2-byte field length, which gives the length of the data field.

  • Because Ethernet has variable length data fields, their length needs to be known for the receiver to know where the frame ends.

  • The third field is the 4-byte virtual LAN tag.

  • When in use, the first two bytes are set 81 - 00 which tells the receiver that the VLAN tag field is being used.

Question number: 841

» Database » MySQL

Short Answer Question▾

Write in Short

How will you copy the structure of a table without copying the data?

Explanation

There is one method for copying the structure of table without copying the data is create table NEWTable AS select * from OLDTABLE where 1 = 2

Question number: 842

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

What is the output of the following program?

  1. int i = 10;
  2. main ()
  3. {
  4.     extern int i;
  5.     {
  6.         int i = 20;
  7.         {
  8.             const volatile unsigned i = 30;
  9.             printf ( “%d” i);
  10.         }
  11.         printf ( “%d” i);
  12.     }
  13.     printf ( “%d” i);
  14. }

Explanation

30,20,10

In the program ’ {’ introduces new block and thus new scope.

Table shows the program

Table shows the program

int i = 10;

Define the global variable integer i = 10

int i = 20;

Define integer i = 20

{

const volatile unsigned i = 30;

printf (“%d” i);

}

In the innermost block i is declared as, const volatile unsigned which is valid declaration.

i is assumed of type int.

so, printf prints 30.

printf (“%d” i);

}

In the next block, i has value 20 and so printf prints 20.

printf (“%d” i);

}

In the outermost block, i is declared as extern, so no storage space is allocated for it.

After compilation is over the linker resolves it to global variable i.

Therefore, it prints ‘i’ value as 10.