Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. struct student_college_detail {
  4. int college_id;
  5. char college_name[50];
  6. };
  7. struct student_detail {
  8. int id;
  9. char name[20];
  10. float percentage;
  11. struct student_college_detail clg_data;
  12. }stu_data;
  13.  
  14. int main() {
  15. struct student_detail stu_data = {1,"gfgh",90.5,71145,"JNTU"};
  16. printf("id is: %d \n",stu_data.id);
  17. printf("name is: %s \n",stu_data.name);
  18. printf("percentage is: %f \n \n",stu_data.percentage);
  19. printf("college id is: %d \n",stu_data.clg_data.college_id);
  20. printf("college name is: %s \n",stu_data.clg_data.college_name);
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement