0
Is it possible to have a date & time output in C without using Void Main or <time.h>?
4 Answers
+ 1
Thankyou so much for your response :-)
+ 1
yes you can.
#include <stdio.h>
int main() {
printf("date = %s\n", __DATE__);
printf("time = %s\n", __TIME__);
return 0;
}
0
Without void main? definitely yes, int main will work, and is one of the standardised signature of main function.
Without time.h header? maybe, if you know what to do to access system time.
Try to search the net for this topic, I did, but had no luck.
0
Thank you :-)