Structure of Structs in c

#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;
    // structure within structure
    struct student_college_detail clg_data;
}stu_data;
 
int main() 
{
    struct student_detail stu_data = {1, "Raju", 90.5, 71145,
                                       "Anna University"};
    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;
}

3.9
10
Joshua Nazar 105 points

                                    The basic structure

3.9 (10 Votes)
0
3.33
3
Bmende 90 points

                                    struct [structure_tag]
{
    //member variable 1
    //member variable 2
    //member variable 3
    ...
}[structure_variables];
  

3.33 (3 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
can i declare structure inside structure in c can structs in c have functions struct in struct function c what is a struct in c using a structure in c basic structure in c when were structs introduced in c struct structure _name object[1] in c how to create a struct c declaring structure inside a structure in c struct example c struct of objects in c struct in c. c language structs struct syntax c using in structs c== struct syntax in c create structs in c language definition struct in c why structure inside structure is used in C does c have structs def struct in c declaring the struct in the c basic structs use of struct in C how to define a struct in c what are c structs struct of structs making a structure within a structure in c when use struct in c c using structs define structure in c what is a c struct structure within structure in c how to place structure in struct in c struct of structs c define struct object C define a struct in c struct function using structure in c structurees in c how to use struct c how to define structure in c struct of struct c c define struct in struct how to define and use structs c functions in c structs how to make a structure in c structure inside structure in c structure into a c structure in structure in c how to define C struct struct in c write a struct in c using structs in c define struct in c are c structs objects structs in functions C declaring a struct object c structs working c free struct c structures in c what is a struct in c how to make a struct in c struct in c syntax use of structure in c how does a struct work in c defining a struct in c can we write structure inside a structure in c structre in c c for structs learn structs in C functions in structs in c functions that operate on structs in c define struct C what is the used of struct in c using structs within structs in C c using structs as objects what are structs in c how to use structs in c Structs C declaring structs in c defining struct in C struct c how to use struct in c what is struct in c structs in c struct in c why we use structure in c functions in structs c structure type in c struct inside a struct c c programming structures c structs example how to pull structures data c language use struct in c calling a structure in c how to insert new structure members in c structure&rsquo;s name c c struct example how to add structure member in c how to add members in structure in c how to add struture members in c c programming struct in struct c programming struct structure how to use struct Person in c struct in c : var; example of struct in c struct add c Write a C program demonstrating structure. struct within struct in c programming in c structs structure within structure c programming struct C tructure how to complete struct c struct c example creating data structures in c struct examples in c struct programme how to use structure in c nesting of structure in c Create structure derived from other structures in C how to print structure data in function in c creating the structur in the c structure in c example program structure in c example c structure variable use example different types of structure declaration in c different types of structure in c struct examples with c how to access structures inside of structures in C program to write structure in c c int as struct declare a struct insade the struct in c structures c -&gt; stracts in c structs using int in c atrcuts in c structure type variable c form struct c structures in c programming struct example in c struct in struct user defined struct function how to define struct in c c strukt structure names in c how to connect structure in c example how to create a structure in c strucures in c create a struct c c how to input in structure struct variables structures and examples c programs write a c program for structure write a c program for structur function in structure in c Wap to implement declaration structure and expression structure. using a structure inside another structure struct i c how to create a player struct c example how to create a struct in c that requires member that are used for possible date example how to create a struct in c that requires members that are used for possible dates coding structure example struct on struct making struct in c structs c program include a struct inside struct c syntax for struct struct variables of a struct struct based structure c strcuts in c structs in c examples how to create structure class in c program nested structs struct in struct in c structs containing struct c structures how to enter data in structure in c struckt in c create types of structs c struct in c # using struct in c structure in programming example of struct building a struct in c how to define a nested structure in c Build struct c c struct in struct strucs c programming declare structure inside structure declare structure inside sgucute struct inside struct c c struct data structure how to write structures in c access struct inside a struct c display strucutres C language a structure code in c c create a struct use struct c Structure in c language nested structure in c difine structer in c c struc how to create a data structure in c how to acess struct inside a struct how to add to struct in c structure c structure of structure in c struct in c example creating structs in c nested structures struct as var in struct c what kind of structs can you have in C setup a struct c code struct example struct within struct c creating structure in c struct within struct how to change structure representation in C what is structure in c full tutorial accept input for structure in c struct program in c structures examples in c example of structures in c strcut in c accessing a struct within a struct make a person struct in c make a struct in c A structure in programming struct in c programming create a program of structure in c how to create a struct in c structure in c programming struct usage in c struct examples struck in c struct meaning in c how to use structure pointer to struct in nested structured text struct inside struct hoe to define different parts of a structure in c nested structure struct c totoryal struct c programming what is struct in programming write to struct int in C code calling struct within a struct truct c c strucy Structure of Structs in c c structs structure in a structure in c structure inside a structure in c What is an structure ? Explain Declaration, initialisation, nested structure, passing structure in function in detail with syntax and example. structures in c # struct in a struct c struct in struct c how to store struct in struct defining structure in c structure in c
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source