What will be the output of the following C code?   #include #include #include int main() { time_t ct; time(&ct); printf("%s\n",ctime(&ct)); } a) only current date b) only current date and current time c) current date, current time and the day of the week d) only current time

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter14: Exception Handling
Section: Chapter Questions
Problem 14SA
icon
Related questions
Question

What will be the output of the following C code?

 

#include<stdio.h>

#include<stdlib.h>

#include<time.h>

int main()

{

time_t ct;

time(&ct);

printf("%s\n",ctime(&ct));

}

a) only current date

b) only current date and current time

c) current date, current time and the day of the week

d) only current time

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning