Last active
April 18, 2017 09:30
-
-
Save Phuseos/83d382f3c906b1b5f9552f7e7cf8dacc to your computer and use it in GitHub Desktop.
Prints a predifined string to the terminal, for usage with macOS
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
#import <stdio.h> | |
#define INTNUMBER 10 | |
#define NEWLINE '\n' | |
int main(){ | |
//Simple program that prints 'Defined number found: 10' when ran. | |
printf("Defined number found: %d", INTNUMBER); | |
printf("%c", NEWLINE); //Creates a new line | |
return 0; | |
} | |
/* | |
USAGE | |
Compile on a mac terminal: cc YourFileHere.c -o YourProgramNameHere | |
You can run it by entering in the terminal: ./YourProgramNameHere | |
Replace YourFileHere with your .c file and YourProgramNameHere with the name you want to give your program. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment