Last active
October 17, 2021 03:21
-
-
Save richardwei6/e3dfa0157b72890230ebe42413435dfe to your computer and use it in GitHub Desktop.
Coding Club C Workshop 1
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 <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