Questions

Q:

We want to round off x, a Float to an Int value. The correct way to do so would be

A) Y = ( int ) ( x + 0.5 ) ; B) Y = int ( x + 0.5) ;
C) Y = ( int ) x + 0.5; D) Y = ( int ) ( ( int ) x + 0.5 )
 
Answer & Explanation Answer: A) Y = ( int ) ( x + 0.5 ) ;

Explanation:

Rounding off a value means replacing it by a nearest value that is approximately equal or smaller or greater to the given number.

 

y = (int)(x + 0.5); here x is any float value. To roundoff, we have to typecast the value of x by using (int)

 

Example:

 

#include

 

int main ()

 

{

 

  float x = 2.6;

 

  int y = (int)(x + 0.5);

 

  printf ("Result = %d\n", y );

 

  return 0;

 

}

 

Result : 3

Report Error

View Answer Report Error Discuss

Filed Under: Programming

2 5343
Q:

Rearrange the parts of the sentence in correct order.

The government should

P : provide health insurance

Q : to buy their own

R : for those unable

A) PQR B) RPQ
C) QRP D) PRQ
 
Answer & Explanation Answer: D) PRQ

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 5343
Q:

Deficiency of 'Thiamine'

A) Beri-Beri B) Pellagra
C) Anaemia D) Rickets
 
Answer & Explanation Answer: A) Beri-Beri

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

17 5341
Q:

Begum Akhtar is associated to which art form?

 

A) Dance B) Painting
C) Music D) Folk Art  
 
Answer & Explanation Answer: C) Music

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities
Exam Prep: Bank Exams

0 5337
Q:

The United Nation declared 2006 as the International year of

A) Rice B) World Population
C) Communication D) Elderly Persons
 
Answer & Explanation Answer: A) Rice

Explanation:
Report Error

View Answer Report Error Discuss

6 5337
Q:

Which Battle marked the end of Napoleon era

Answer

Waterloo

Report Error

View answer Workspace Report Error Discuss

Subject: World History

22 5337
Q:

Which of the following is Not an Operating System?

A) UNIX B) Windows NT
C) C++ D) DOS
 
Answer & Explanation Answer: C) C++

Explanation:

C++ is not an Operating System.

 

An Operating System is a collection of system programs that manages all the other programs application programs in a computer as well as the allocation and use of hardware resources such as the CPU, Memory and the Hard Disk Drive.

It acts as an interface between the hardware and the user level program.

It controls and facilitates the overall operation of a computer. 

 

Here

UNIX : UNIX is a popular multi-user, multitasking operating system (OS) developed at Bell Labs.

 

Windows NT : Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993.

 

DOS : DOS is Disk Operating System. The term DOS can refer to any operating system.

 

C++ : C++ is a programming language and computing platform.

 

Hence, C++ is not an Operating System.

Report Error

View Answer Report Error Discuss

8 5335
Q:

'Skycar' , a light aerial multi-purpose vehicle, is set to make its world debut in the US. Name the company which has developed the model?

A) Ford B) Audi
C) Rolls Royce D) Moller International
 
Answer & Explanation Answer: D) Moller International

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Business Awareness

32 5333