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

3 6532
Q:

What is the resident set and working set of a process?

Answer

Resident set is that portion of the process image that is actually in real-memory at a particular instant. Working set is that subset of resident set that is actually needed for execution. (Relate this to the variable-window size method for swapping techniques.)

Report Error

View answer Workspace Report Error Discuss

1 6532
Q:

Water soluble vitamin include

A) vitamin C B) niacin
C) riboflavin D) all of the above
 
Answer & Explanation Answer: D) all of the above

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams
Job Role: Bank Clerk

31 6529
Q:

Which keystroke is used for updating a field?

A) F11 B) F12
C) F6 D) F9
 
Answer & Explanation Answer: D) F9

Explanation:

F9 keystroke is used for updating a field.

Report Error

View Answer Report Error Discuss

5 6527
Q:

Which element is used for the shiny trim on cars?

A) Silicon B) Aluminium
C) Chromium D) Carbon
 
Answer & Explanation Answer: C) Chromium

Explanation:

Chromium is the chemical element that is used as a shiny metal on the automobile bodies especially for trim.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

2 6526
Q:

A bill presented in Parliament becomes an Act after -

A) The Prime Minister has signed it B) The Supreme Court has declared it to be within the competence of the Union Parliament
C) The President has given her/his assent D) It is passed by both the Houses
 
Answer & Explanation Answer: C) The President has given her/his assent

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

11 6522
Q:

Discovery of the nucleus of an atom was due to the experiment carried out by

A) Bohr B) Rutherford
C) Moseley D) Thomson
 
Answer & Explanation Answer: B) Rutherford

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

8 6522
Q:

Ms. Vijaya Mehta has earned distinction in which of the following fields

A) Theatre B) Journalism
C) Classical Dance D) Film Direction
 
Answer & Explanation Answer: A) Theatre

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities

7 6521