Last active
August 16, 2023 09:33
-
-
Save joegasewicz/88d38cc58feb3e92d6b941511f18e9d9 to your computer and use it in GitHub Desktop.
C Primitive Types
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> | |
#include <stdlib.h> | |
int main() | |
{ | |
int myInt; | |
signed int mySignedInt; | |
unsigned int myUnsignedInt; | |
short myShort; | |
signed int mySignedShort; | |
unsigned int myUnsignedShort; | |
short int myShort2; | |
signed short int mySignedShort2; | |
unsigned short int myUnsignedShort2; | |
long myLong; | |
signed long mySignedLong; | |
unsigned long myUnsignedLong; | |
long long myLong2; | |
signed long long mySignedLong2; | |
unsigned long long myUnsignedLong2; | |
long long int myLong4; | |
signed long long int mySignedLong4; | |
unsigned long long int myUnsignedLong4; // or use 0000L | |
float myFloat; | |
double myDouble; | |
long double myDouble2; | |
char myChar; | |
_Bool myBool; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment