Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions ch01/1-10.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,34 @@
* This makes tabs and backspaces visible in an unambiguous way.
*/

#include <stdio.h>
#include <stdio.h> //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;
}
18 changes: 13 additions & 5 deletions key-note/init-arr.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
#include <stdio.h>
/* This Program is basically to make the understanding about the
array of the Global type and the wway to print their values */
#include <stdio.h> //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;
}