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 140 views
1 answer 125 views
1 answer 118 views
1 answer 148 views
1 answer 118 views
1 answer 157 views
...