move exercises, lecture examples, labs into subfolders

This commit is contained in:
2023-10-13 16:19:51 +01:00
parent a602f20e01
commit 015b5d6a08
200 changed files with 2 additions and 2 deletions

25
Exercises/C19/ex2.c Normal file
View File

@@ -0,0 +1,25 @@
#include <stdio.h>
struct Person {
int age;
char forename[30];
char surname[50];
};
void print_person(struct Person p) {
printf("p.age=%d p.forename=%s p.surname=%s\n", p.age, p.forename, p.surname);
}
int main() {
struct Person p;
printf("Enter age: "); scanf("%d", &p.age);
printf("Enter forename: "); scanf("%29s", p.forename);
printf("Enter surname: "); scanf("%49s", p.surname);
print_person(p);
return 0;
}