# 3i Infotech Placement: Sample Questions 919 - 921 of 1245

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

## Question 919

Edit

### Write in Short

What is the output of the following program?

`main(){ unsigned int i=65000; while(i++!=0); printf("%d",i);}`

### Explanation

In the program

 unsigned int i = 65000; Define the unsigned integer variable i = 65000. while (i ++ ! = 0) ;printf ( “% d” , i) ; Note the semicolon after the while statement.When the value of i becomes 0 it comes out of while loop.Due to post-increment on i the value of i while printing is 1

## Question 920

Edit

### Write in Short

What is passive topology?

### Explanation

• When the computers on the network simply listen and receive the signal, they are referred to as passive because they don՚t amplify the signal in any way.
• Example for passive topology - linear bus.
• Linear bus topology consists of a main run of cable with a terminator at each end.
• All nodes are connected to the linear cable.
• Ethernet and local talk network use a linear bus topology.

## Question 921

Appeared in Year: 2004

### Question

MCQ▾

What is the output of following piece of code?

1. `int x =2.`
2. `switch (x)`
3. `{`
4. `    case 1:System. Out. Println ( “1” );`
5. `    case 2:Case 3:System. Out. Println ( “3” );`
6. `case 4:Case 5:System. Out. Println ( “5” ); }`

Choice (4)

a.

135

b.

35

c.

No output

d.

3