Examveda

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);
}

A. 17

B. 2017

C. error

D. 117

Answer: Option D


This Question Belongs to C Program >> Standard Library Functions

Join The Discussion

Related Questions on Standard Library Functions