What will be the output of the following C code if the system date is 8/22/2016? [code]#include<stdio.h> #include<time.h> int main() {

What will be the output of the following C code if the system date is 8/22/2016?
Code:
#include<stdio.h>
#include<time.h>
int main()
{
    struct tm *ptr;
    time_t t;
    char str[100];
    t = time(NULL);
    ptr = localtime(&t);
    strftime(str,100,"%B",ptr);
    puts(str);
    return 0;
}
A. 9
B. August
C. Aug
D. Error
 

Tìm kiếm

Back
Top