diff --git a/ch01/1-10.c b/ch01/1-10.c index f0a7417..80d895b 100644 --- a/ch01/1-10.c +++ b/ch01/1-10.c @@ -5,22 +5,34 @@ * This makes tabs and backspaces visible in an unambiguous way. */ -#include +#include //header File for the input and output -int main() { +int main() +{ char c; - while ((c = getchar()) != EOF) { - if (c == '\t') { + + while ((c = getchar()) != EOF) //Loop will Run till the word get ends + { + if (c == '\t') + { putchar('\\'); putchar('t'); - } else if (c == '\b') { + } + else if (c == '\b') + { putchar('\\'); putchar('b'); - } else if (c == '\\') { + } + else if (c == '\\') + { putchar('\\'); putchar('\\'); - } else { + } + else + { putchar(c); } } + + return 0; } diff --git a/key-note/init-arr.c b/key-note/init-arr.c index 5a6d725..4f73dca 100644 --- a/key-note/init-arr.c +++ b/key-note/init-arr.c @@ -1,13 +1,21 @@ -#include +/* This Program is basically to make the understanding about the + array of the Global type and the wway to print their values */ +#include //Header File for input and output -int global[2]; -int global2[2] = {1}; +int global[2]; // Global type of Array variables +int global2[2] = {1}; // the value assigned 1 at index 2 of another array of global type. -int main() { +int main() +{ int local[2]; int local2[2] = {1}; - printf("global[0]: %d\n", global[0]); + + // Printing of the All necessary values that we want: + + printf("global[0]: %d\n", global[0]); printf("global2: {%d, %d}\n", global2[0], global2[1]); printf("local[0]: %d\n", local[0]); printf("local2: {%d, %d}\n", local2[0], local2[1]); + + return 0; }