diff --git a/C/YT-BroCode/HelloWorld/helloworld.c b/C/YT-BroCode/HelloWorld/helloworld.c index 589c010..35b3cb1 100644 --- a/C/YT-BroCode/HelloWorld/helloworld.c +++ b/C/YT-BroCode/HelloWorld/helloworld.c @@ -2,7 +2,7 @@ int main () { - printf("Hello World!\nFrom the C Programming Language\n"); + printf("\v\v\v\v\v\v\v\v\t\tHello World!\n\tFrom the C Programming Language\n"); return 0; diff --git a/C/YT-BroCode/Strings/strings.c b/C/YT-BroCode/Strings/strings.c new file mode 100644 index 0000000..6754d2a --- /dev/null +++ b/C/YT-BroCode/Strings/strings.c @@ -0,0 +1,16 @@ +#include +#include + +int main() { + + /* Strings are character arrays */ + char name[100]; + + printf("\n\n\tPlease enter your name: \n"); + fgets(name, 100, stdin); + name[strlen(name)-1] = '\0'; // This removes the newline character at the end of 'name' variable + + printf("\n\nHello %s!\n\n", name); + + return 0; +}