51. What is the meaning of the following C code if output is 0?
#include<stdio.h>
#include<time.h>
int main()
{
struct tm *local;
time_t t;
t=time(NULL);
local=localtime(&t);
printf("%d",local->tm_isdst);
return 0;
}
#include<stdio.h>
#include<time.h>
int main()
{
struct tm *local;
time_t t;
t=time(NULL);
local=localtime(&t);
printf("%d",local->tm_isdst);
return 0;
}52. What is the purpose of the given C code?
#include <stdlib.h>
_Mbsave _Mbxtowc = {0};
int (mbtowc) (wchar_t *pwc, const char *a, size_t n)
{
return (-Mbtowc (pwc, s, n, &-Mbxtowc) ) ;
}
#include <stdlib.h>
_Mbsave _Mbxtowc = {0};
int (mbtowc) (wchar_t *pwc, const char *a, size_t n)
{
return (-Mbtowc (pwc, s, n, &-Mbxtowc) ) ;
}53. What will the following C code do on compilation?
void main ()
{
char com[50];
strcpy( com, "dir" );
system(com);
}
void main ()
{
char com[50];
strcpy( com, "dir" );
system(com);
}54. What error occurs if the magnitude of x is too large in sinh(double x)?
55. What will be the output of the following C code if the current system date is 6/22/2017?
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
typedef struct tm tm;
int main()
{
time_t ct;
time(&ct);
tm *mt=localtime(&ct);
printf("%d\n",mt-> tm_year);
}
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
typedef struct tm tm;
int main()
{
time_t ct;
time(&ct);
tm *mt=localtime(&ct);
printf("%d\n",mt-> tm_year);
}56. The cos function computes the cosine of x.
57. Which of the following format specifiers is used to represent the name of the time zone?
58. Which macro is used in the setlocale() function?
59. The value returned by the library function mktime(), on failure is . . . . . . . .
60. Which of the following functions decomposes the input string into three pans: an initial, possibly empty, sequence of white-space characters?
Read More Section(Standard Library Functions)
Each Section contains maximum 100 MCQs question on Standard Library Functions. To get more questions visit other sections.
