ExamVeda
Login
Home
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;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
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) ) ;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
53
What will the following C code do on compilation?
void main () 
{
   char com[50];  
   strcpy( com, "dir" ); 
   system(com); 
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
54
What error occurs if the magnitude of x is too large in sinh(double x)?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
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);
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
56
The cos function computes the cosine of x.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
57
Which of the following format specifiers is used to represent the name of the time zone?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
58
Which macro is used in the setlocale() function?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
59
The value returned by the library function mktime(), on failure is . . . . . . . .
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
60
Which of the following functions decomposes the input string into three pans: an initial, possibly empty, sequence of white-space characters?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board