Search
 
SCRIPT & CODE EXAMPLE
 

C

C output color font

#include <stdio.h>

//defining all combinations to be used.
#define RED   "x1B[31m"
#define GRN   "x1B[32m"
#define YEL   "x1B[33m"
#define BLU   "x1B[34m"
#define MAG   "x1B[35m"
#define CYN   "x1B[36m"
#define WHT   "x1B[37m"
#define RESET "x1B[0m"

int main() {
	//Using defines very easily without a need for '%s' of 'x1B[...'
    printf(RED "red
"     RESET);
    printf(GRN "green
"   RESET);
    printf(YEL "yellow
"  RESET);
    printf(BLU "blue
"    RESET);
    printf(MAG "magenta
" RESET);
    printf(CYN "cyan
"    RESET);
    printf(WHT "white
"   RESET);
	
  	return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: run time in c 
C :: c bold text 
C :: powershell search files for string 
C :: java.lang.SecurityException: Permission denied (missing INTERNET permission?) 
C :: calculate distance between 2 points X Y axis 
C :: c get time in milliseconds 
C :: c remove last character from a string 
C :: how to print something out to the console c 
C :: arma 3 get group size 
C :: convert string to float c 
C :: execution time of c program 
C :: Reduce fractions in C 
C :: bash convert find to array 
C :: remove element from np array 
C :: operators priority in c 
C :: que es % en c 
C :: c bit access union 
C :: how to turn off zsh 
C :: c random array 
C :: Graphics in C Draw A Line 
C :: goto statement in c 
C :: Gemfile.lock`. It is likely that you need to grant write permissions for that path. 
C :: C scanf() to read a string 
C :: Write a C program to merge two array to third array. 
C :: getting string input in c 
C :: print hello world in c 
C :: variables in c 
C :: c include delay 
C :: Float and Double Input/Output 
C :: how to input till end of line in c 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =