Partially changed file structure to suit VSCode

This commit is contained in:
Louise Brown
2022-10-24 14:01:59 +01:00
parent 1c0a9e7b6a
commit a2c8695634
29 changed files with 30 additions and 21 deletions

View File

@@ -8,13 +8,13 @@
int main()
{
char MyName[50]; /* Define a string of 10 characters */
char MyName[11]; /* Define a string of 10 characters */
/* A string */
printf("\nPlease enter your name & press return ");
fgets(MyName, 80, stdin);
fgets(MyName, 11, stdin);
printf("\nHello %s ",MyName);
return 0; /* End of the program */

View File

@@ -15,9 +15,10 @@ int main(void)
char x; /* Define a variable of type char */
printf("Input a character: ");
x = getch(); /* Use getchar to read a keypress and store the */
/* result in 'x' */
printf("\nDisplaying the char with putchar: ");
putchar(x); /* Display the character stored in 'x' on the */
/* screen using putchar */

View File

@@ -8,7 +8,7 @@
int main( void )
{
char MyName[50]; /* Define a string of 10 characters */
char MyName[10]; /* Define a string of 10 characters */
/* A string */