Top

Library Functions

71.

Which macro is used in the setlocale() function?

Answer: C

No answer description available for this question.

Enter details here

Answer: A

No answer description available for this question.

Enter details here

73.

Which of the given option is declared under the header file stdlib.h?

Answer: D

SEEK_CUR and SEEK_END is defined under stdio.h, CLOCKS_PER_SEC is defined under time.h, EXIT_SUCCESS is defined under stdlib.h.
EXIT_SUCCESS specifies value for status argument to exit indicating success.

Enter details here

74.

The library function clock() returns the number of _________ elapsed since the start of the program.

Answer: B

No answer description available for this question.

Enter details here

75.

What will be the output of the program?

#include
#include

int main()
{
    char *i = "55.555";
    int result1 = 10;
    float result2 = 11.111;
    result1 = result1+atoi(i);
    result2 = result2+atof(i);
    printf("%d, %f", result1, result2);
    return 0;
}

 

Answer: C

Function atoi() converts the string to integer.
Function atof() converts the string to float.

result1 = result1+atoi(i);
Here result1 = 10 + atoi(55.555);
result1 = 10 + 55;
result1 = 65;

result2 = result2+atof(i);
Here result2 = 11.111 + atof(55.555);
result2 = 11.111 + 55.555000;
result2 = 66.666000;
So the output is "65, 66.666000" .

Enter details here

76.

The _______ macro shall be invoked before any access to the unnamed arguments.

Answer: D

No answer description available for this question.

Enter details here

77.

Which function returns a pseudo-random integer?

Answer: B

No answer description available for this question.

Enter details here

78.

Can you use the fprintf() to display the output on the screen?

Answer: A

Do like this fprintf(stdout, "%s %d %f", str, i, a);

Enter details here

79.

Which macro can be used to detect and report exceptional conditions?

Answer: C

No answer description available for this question.

Enter details here

80.

What will be the output of the program?

#include

int main()
{
    int i;
    i = scanf("%d %d", &i, &i);
    printf("%d\n", i);
    return 0;
}

 

Answer: B

No answer description available for this question.

Enter details here

Loading…
Tags: Library Functions Questions and Answers || Library Functions MCQ Questions and Answers || Library Functions GK Questions and Answers || Library Functions GK MCQ Questions || Library Functions Multiple Choice Questions and Answers || Library Functions GK || GK on Library Functions || C Programming Questions and Answers || C Programming MCQ Questions and Answers || C Programming GK Questions and Answers || GK on C Programming