24 lines
376 B
C
24 lines
376 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
/*STRUCT*/
|
||
|
|
||
|
struct student {
|
||
|
char *name;
|
||
|
int age;
|
||
|
float grade;
|
||
|
};
|
||
|
int main(void){
|
||
|
struct student engStudent;
|
||
|
engStudent.name ="Jon Snow";
|
||
|
engStudent.age = 19;
|
||
|
engStudent.grade =8.5;
|
||
|
|
||
|
printf("Name: %s\n, engStudent.name");
|
||
|
printf("Age: %d\n, engStudent.age");
|
||
|
printf("Grade: %f\n, engStudent.grade");
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|