3i Infotech Papers: Sample Questions 702 - 703 of 1245

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

Question number: 702

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

  1. #include<studio.h>
  2. main ()
  3. {
  4.     struct xx
  5.     {
  6.         int x = 3;
  7.         char name[] = “hello
  8.     };
  9.     struct xx * s;
  10.     printf ( “%d” s → x);
  11.     printf ( “%s” s → name);
  12. }

Explanation

  • In C language all variables declare in first and then apply and function.

  • But here should not initialize variables in declaration.

Table shows the program

Table shows the program

  1. struct xx
  2. {
  3.     int x = 3;
  4.     char name[] = “hello
  5. };

Here struct xx is a declaration

Define integer variable x = 3

And char array name [] =”hello”

struct xx * s;

Struct xx define a pointer s

printf (“%d” s → x);

Here print the value of x but x not initialize variable in declaration

  • So the Answer is Compiler Error.

Question number: 703

» Basic CS » Networks

Essay Question▾

Describe in Detail

Can you name a couple of Layer 2 (Data link) protocols?

Explanation

Ethernet:

  • Provides services corresponding to Layer 1 and Layer 2 of the OSI reference model.

  • Different standards used in Ethernet define the different layer-1 and layer-2 protocols.

  • Data link layer provides mechanisms for converting packets to frames while the physical layer converts frames to bits transmitted over the physical media.

FDDI:

  • Fibre Distributed Data Interface.

  • Set of ANSI and OSI standards for data transmission on fibre optic lines in local area network extending up to 200km.

  • Use token ring protocol.

  • High-speed backbone technology supporting greater distances than copper.

ATM:

  • Asynchronous Transfer Mode.

  • High-speed networking standard supporting voice, video, and data communications.

  • Utilized by internet service providers on their private long-distance network.

  • Easily implemented by hardware providing faster processing and switch speeds.

  • Provides data-link-layer services running on the OSI’s Layer 1 physical links.

  • Virtual circuit or connection is established before the two end-points can actually exchange data.