# 3i Infotech Placement: Sample Questions 376 - 378 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 376

### Question

MCQ▾If R, S, and Q can wallpaper a house in 8 hours and R and S can do it in 12 hours, how long will it take Q alone to wallpaper the house?

### Choices

Choice (4) | |
---|---|

a. | 12 hours |

b. | 8 hours |

c. | 20 hours |

d. | 24 hours |

### Answer

d.### Explanation

R, S and Q together can complete the work in 8 hours.

R and S can do the same work in 12 hours.

We are asked to find the time taken by Q to complete the same work.

Let Q is taking x hours to complete the work.

So, Q alone will take 24 hours to complete the work.

## Question 377

### Explanation

- To get string of words is Gets () .
- Gets () accepts single or multiple characters of string including spaces from the standard input device.
How to declare:

gets (variable_name) ;

Example of declaration:

char ch [10] ;

gets (ch) ;

- Gets () read string from the screen.
- Gets () statement encounters the characters entered by user will be copied into the variable.
- Gets () uses stdin (Standard Input Output) as source, but it does not include the ending newline character in the resulting string and does not allow to specify a maximum size for string variable.

## Question 378

### Describe in Detail

Essay▾In the given binary tree, using array we can store the node 4 at which location?

### Explanation

- At location 6: 1 2 3 -- 4 -- 5
- This is how array stores the tree: Root LC
_{1}RC_{1}LC_{2}RC_{2}LC_{3}RC_{3}LC_{4}RC_{4}, where LC_{n}means Left Child of node n and RC_{n}means Right Child of node n