OneCompiler

C programming

144

#include <stdio.h>
struct student{
char name[50];
char major[50];
int age;
double gpa;
};

int main(){
struct student student1;
student1.age=56;
student1.gpa=2.45;
strcpy( student1.name, "Jim");
strcpy( student1.major, "Art");

printf("%s",student1.name);
return 0;
}