Created
October 16, 2017 02:18
-
-
Save tensaix2j/1a87f105f398558dac278f05703ee848 to your computer and use it in GitHub Desktop.
How to printf with color on terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define KGRN "\033[0;32;32m" | |
#define KCYN "\033[0;36m" | |
#define KRED "\033[0;32;31m" | |
#define KYEL "\033[1;33m" | |
#define KBLU "\033[0;32;34m" | |
#define KCYN_L "\033[1;36m" | |
#define KBRN "\033[0;33m" | |
#define RESET "\033[0m" | |
int main() { | |
printf(KRED"Hello world!\n"RESET); | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment