Top

Library Functions

Answer: D

rewind() takes the file pointer to the beginning of the file. so that the next I/O operation will take place at the beginning of the file.
Example: rewind(FilePointer);

Enter details here

92.

What will be the output of the program?

#include
#include<math.h>

int main()
{
    float i = 2.5;
    printf("%f, %d", floor(i), ceil(i));
    return 0;
}

 

Answer: C

Both ceil() and floor() return the integer found as a double.

floor(2.5) returns the largest integral value(round down) that is not greater than 2.5. So output is 2.000000.

ceil(2.5) returns 3, while converting the double to int it returns '0'.
So, the output is '2.000000, 0'.

Enter details here

93.

How many macros are defined in the header file stdarg.h?

Answer: C

No answer description available for this question.

Enter details here

94.

What will be the output of the following C code?

void main() 
{ 
   div_t  res;  
   res = div(34, 4); 
   printf("quotient part = %d\n", res.quot); 
   printf("remainder part = %d\n", res.rem); 
}

 

Answer: B

div_t div(int n, int d) used to divide n (numerator) by d (denominator). div_t is a structure defined in ,which has two members
int quot;
in rem;

Enter details here

95.

The macro which is used to find the maximum value of an unsigned integer is _________

Answer: C

No answer description available for this question.

Enter details here

96.

Which of the following library functions returns the time in UTC (Greenwich mean time) format?

Answer: C

No answer description available for this question.

Enter details here

97.

Select the function that reads or sets location dependent information.

Answer: B

No answer description available for this question.

Enter details here

Answer: C

No answer description available for this question.

Enter details here

Answer: D

No answer description available for this question.

Enter details here

100.

Is standard library a part of C language?

Answer: B

The C standard library consists of a set of sections of the ISO C standard which describe a collection of header files and library routines used to implement common operations, such as input/output and string handling, in the C programming language. The C standard library is an interface standard described by a document; it is not an actual library of software routines available for linkage to C programs.

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