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 6545
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 6544
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 6543
Q:

STEP is the abbreviated name of the welfare programme to help

A) Children B) Woman
C) Farmers D) Senior citizens
 
Answer & Explanation Answer: B) Woman

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

15 6539
Q:

Who has penned a book titled 'I Do What I Do: On Reform, Rhetoric and Resolve' ?

A) Ajay Tyagi B) Raghuram Rajan
C) Bimal Jalan D) Urjit Patel
 
Answer & Explanation Answer: B) Raghuram Rajan

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors
Exam Prep: Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

14 6537
Q:

When was the first central legislative assembly constituted?

A) 1909 B) 1917
C) 1920 D) 1925
 
Answer & Explanation Answer: C) 1920

Explanation:

The first central legislative assembly constituted in the year 1920.

Report Error

View Answer Report Error Discuss

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

4 6535
Q:

The construction of Warangal Fort was started by ______ ?

A) Beta - II B) Rudra
C) Jayapa D) Prola - II
 
Answer & Explanation Answer: B) Rudra

Explanation:
Report Error

View Answer Report Error Discuss

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

24 6533
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 6533