Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- struct student_college_detail {
- int college_id;
- char college_name[50];
- };
- struct student_detail {
- int id;
- char name[20];
- float percentage;
- struct student_college_detail clg_data;
- }stu_data;
- int main() {
- struct student_detail stu_data = {1,"gfgh",90.5,71145,"JNTU"};
- printf("id is: %d \n",stu_data.id);
- printf("name is: %s \n",stu_data.name);
- printf("percentage is: %f \n \n",stu_data.percentage);
- printf("college id is: %d \n",stu_data.clg_data.college_id);
- printf("college name is: %s \n",stu_data.clg_data.college_name);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement