recategorized by
852 views
2 votes
2 votes

For $x$ and $y$ are variables as declared below $\textit{double }x=0.005, \: y = – 0.01;$ What is the value of $\text{ceil }(x+y)$, where $\text{ceil }$ is a function to compute ceiling of a number?

  1. $1$
  2. $0$
  3. $0.005$
  4. $0.5$
recategorized by

1 Answer

1 votes
1 votes
Option B

x+y = 0.005-0.01 =CEIL(-0.005)=0
Description
CEIL(x) rounds the number x up.
Examples
CEIL(1.3) equals 2
CEIL(-1.6) equals -1
Answer:

Related questions

4 votes
4 votes
1 answer
1
admin asked Apr 2, 2020
1,275 views
An external variableis globally accessible by all functionshas a declaration “extern” associated with it when declared within a functionwill be initialized to $0$ if ...
2 votes
2 votes
1 answer
2
admin asked Apr 2, 2020
1,907 views
If initialization is a part of declaration of a structure, then storage class can beautomaticregisterstaticanything
1 votes
1 votes
3 answers
3
admin asked Apr 2, 2020
1,115 views
In C programming language, if the first and the second operands of operator $+$ are of types int and float, respectively, the result will be of type intfloatcharlong int
1 votes
1 votes
1 answer
4
admin asked Apr 2, 2020
1,345 views
What will be the value of $x$ and $y$ after execution of the following statement(C language) n = 5; x = n++; y = -x;$5,-4$$6,-5$$6,-6$$5,-5$