### GATE-Computer Networks - Token Ring

Previous GATE questions with solutions on Computer Networks (Token Ring) - CS/IT

GATE - 2007
1. In a token ring network the transmission speed is 10bps and the propagation speed is 200 metres/ms. The 1-bit delay in this network is equivalent to:
(a) 500 metres of cable      (b) 200 metres of cable
(c) 20 metres of cable       (d) 50 metres of cable

Ans: option (c)
Explanation:

Transmission delay for 1 bit t = 1/(107) = 0.1 micro seconds.
Given that propagation speed = 200 meters/ms
That means, 200 meters can be traveled in 1 micro second.
Hence in 0.1 micro seconds, 20 meters can be traveled.

OR

1 Bit Delay = 1/B = 1/(107) = 0.1 micro seconds.
Given that propagation speed = 200 meters/ms
That means, 200 meters can be traveled in 1 micro second.
Hence in 0.1 micro seconds, 20 meters can be traveled.

### C Questions

C Questions
C Questions

Note : All the programs are tested under Turbo C/C++ compilers.
It is assumed that,
Programs run under DOS environment, The underlying machine is an x86 system, Program is compiled using Turbo C/C++ compiler.
The program output may depend on the information based on this assumptions (for example sizeof(int) == 2 may be assumed).
Predict the output or error(s) for the following:

void main()
{
int const * p=5; printf("%d",++(*p));
}
Compiler error: Cannot modify a constant value.
Explanation:
p is a pointer to a "constant integer". But we tried to change the value of the "constant integer".
main()
{
char s[ ]="man"; int i;
for(i=0;s[ i ];i++)
printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);
}
aaaa nnnn
Explanation

### Zoho Interview | Set 1 (Advanced Programming Round)

Third Round: (Advanced Programming Round) Here they asked us to create a “Railway reservation system” and gave us 4 modules. The modules were:
1. Booking
2. Availability checking
3. Cancellation
4. Prepare chart
We were asked to create the modules for representing each data first and to continue with the implementation phase.

My Solution :