Skip to content

Instantly share code, notes, and snippets.

@richardwei6
Last active October 17, 2021 03:21
Show Gist options
  • Save richardwei6/e3dfa0157b72890230ebe42413435dfe to your computer and use it in GitHub Desktop.
Save richardwei6/e3dfa0157b72890230ebe42413435dfe to your computer and use it in GitHub Desktop.
Coding Club C Workshop 1
#include <stdio.h>
#include <stdbool.h>
#include <math.h>
int main(){
printf("Hello World\nNew line\nTest");
//
int t = 0 + 6;
t += 10;
printf("Integer - %i \n", t);
//
char f = 'F';
printf("Char - %c \n", f);
//
char s[4] = "123"; // needs at LEAST n + 1 size for end of array indicator
printf("String of size 4 - %s \n", s);
//
char a[50] = {'a', 'b'};
printf("String of size 2 but memory size 50 - %s \n", a);
//
printf("Multiple - %c - %i - %s", f, t, a);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment