in Programming in C recategorized by
822 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$
in Programming in C recategorized by
by
822 views

1 comment

B is the correct option.
0
0

1 Answer

1 vote
1 vote
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