Untitled
unknown
plain_text
a year ago
572 B
3
Indexable
#include<stdio.h> struct college_details { char college_name[25]; int college_id; }; struct student_details{ int id; char name[20]; float percentage; struct college_details clg_data; } stu_data; void main(){ struct student_details stu_data ={1,"Shyam",90.5,771,"TIC"}; printf("ID is: \t\t %d\n",stu_data.id); printf("Name is: \t\t %s\n",stu_data.name); printf("Percentage is: \t %f\n",stu_data.percentage); printf("College ID is: \t%d\n",stu_data.clg_data.college_id); printf("College name is: \t%d\n",stu_data.clg_data.college_name); }
Editor is loading...
Leave a Comment