move exercises, lecture examples, labs into subfolders
This commit is contained in:
20
Exercises/C19/ex1.c
Normal file
20
Exercises/C19/ex1.c
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
struct Person {
|
||||
int age;
|
||||
char forename[30];
|
||||
char surname[50];
|
||||
};
|
||||
|
||||
|
||||
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);
|
||||
|
||||
printf("p.age=%d p.forename=%s p.surname=%s\n", p.age, p.forename, p.surname);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user