Added book examples

This commit is contained in:
Louise Brown
2022-04-08 16:12:38 +01:00
parent 5b205092a7
commit 1c0a9e7b6a
59 changed files with 1381 additions and 0 deletions

19
C7/string_with_gets.c Normal file
View File

@@ -0,0 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
int main()
{
// Declare variable - maximum 99 characters
char str[100];
// Prompt for text
printf("enter some text\n");
// Store intput in str
gets(str);
// Display a message on the screen
printf("you entered : %s\n", str);
// Exit from main
return 0;
}