From 0ae6e6cdc645752f93a6fcf9904ec97649f8fd05 Mon Sep 17 00:00:00 2001 From: Mukul Verma <48083984+Mukul-V@users.noreply.github.com> Date: Thu, 1 Oct 2020 17:43:01 +0530 Subject: [PATCH 1/2] Update 1-10.c --- ch01/1-10.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) 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; } From abcc94156c2546d00e04b46bb1ec1f34c7b4b78b Mon Sep 17 00:00:00 2001 From: Mukul Verma <48083984+Mukul-V@users.noreply.github.com> Date: Thu, 1 Oct 2020 17:49:35 +0530 Subject: [PATCH 2/2] Update init-arr.c --- key-note/init-arr.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) 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; }