Choose the correct alternatives (more than one may be correct) and write the corresponding letters only:
Consider the following Pascal function:
i := 0;
while i*i < M
do i:= i+1
X := i
The function call $X(N)$, if $N$ is positive, will return
For $N=9$, it returns $3$.
For $N=10$ it returns $4$.
For $N=16$ it returns $4$.
For $N=17$ it returns $5$.
So answer should be C.
ceil(X) will return x+1 when x is a decimal and not integer.
floor(x)+1 will add 1 even in case of integers, hence for N=4 it will give answer as 2+1=3. So wrong choice
found this really helpful Channel on YouTube ...
Arjun sir Good Morning,
i didn't get ...