C Programming :: Library Functions

NA
SHSTTON
3
Solv. Corr.
2
Solv. In. Corr.
5
Attempted
0 M:0 S
Avg. Time

1 / 4

Choose the correct option.

The library function sqrt operates on a double precision argument. If, i is an integer variable, which one of the following calls would correctly compute sqrt (i)?


Asqrt ((double)i)

B(double)sqrt (i)

C(double) (sqrt (i))

Dsqrt (i)

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
1
Solv. Corr.
6
Solv. In. Corr.
7
Attempted
0 M:0 S
Avg. Time

2 / 4

What will be the output of following C program.
#include<stdio.h>
void main()
{
sum=0 
for (i=100 , i<0 , i++)
sum += abs(i);
printf("%d", sum)
}

A100

B5050

C-5050

D-100

Answer: Option D

Explanation:

Above answerss are incorrect. 



The Expected answer either the 0 or Compilation error,

Workspace

NA
SHSTTON
3
Solv. Corr.
3
Solv. In. Corr.
6
Attempted
0 M:0 S
Avg. Time

3 / 4

Which of the following library function below by default aborts the program?


ATerminate()

Bend()

CAbort()

Dexit()

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
2
Solv. Corr.
4
Solv. In. Corr.
6
Attempted
0 M:0 S
Avg. Time

4 / 4

Choose the correct option.

What are the types of linkages?


AInternal and External

BExternal, Internal and None

CExternal and None

DInternal

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace