Update 1st June 26

This commit is contained in:
2026-06-01 13:15:48 +00:00
parent 79415e38db
commit bdde9bd1ca
15 changed files with 89 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#include <cs50.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
// FILE here calls FILE function from stdio.h & "a" using for apend.
FILE *file = fopen("phonebook.csv", "a");
if (file == NULL)
{
return 1;
}
char *name = get_string("Name: ");
char *number = get_string("Number: ");
fprintf(file, "%s, %s\n", name, number);
fclose(file);
return 0;
}