Partially changed file structure to suit VSCode
This commit is contained in:
@@ -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 */
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
Reference in New Issue
Block a user