How to get the current date and time with preprocessor macro in C

1 Answer

0 votes
#include <stdio.h>

int main() {
	printf("%s\n", __TIMESTAMP__);
}




/*
run:

Thu Apr 21 09:16:32 2022

*/

 



answered Apr 21, 2022 by avibootz

Related questions

1 answer 146 views
1 answer 129 views
1 answer 123 views
1 answer 158 views
1 answer 124 views
1 answer 164 views
...