#include <stdio.h>
struct StudentData{
char *stu_name;
int stu_id;
int stu_age;
};
int main()
{
struct StudentData student;
student.stu_name = "Steve";
student.stu_id = 1234;
student.stu_age = 30;
printf("Student Name is: %s", student.stu_name);
printf("\nStudent Id is: %d", student.stu_id);
printf("\nStudent Age is: %d", student.stu_age);
return 0;
}
Output:
Student Name is: Steve
Student Id is: 1234
Student Age is: 30
| Topic | View/Download |
|---|---|
| Sample Program of structure in C | View |