Hello, Viewer! Today I am sharing one of the old posts of my blog. because today whatever I learn I think need to give some more time on that topic so that I can write clearly, So till then let's learn one of our old posts...
Structure
- A structure is a way to group a variable.
- A Structure is a collection of dissimilar elements.
- Defining structure means creating a new data type.
- It defines with the Struct Keyword.
Example: Suppose you have to create a website for student details like Roll No., Name, Marks etc. for storing these all types of details we need to define a different-different variable for Storing Roll No. We need to define the var integer, for storing Name we need to define the character and many other types of the variable we need to declare. In this process, our program become too long. so we create a datatype Structure. In the Structure, we declare different-different variables into one pair like..
Struct Students
{
int roll no; // For Storing
char name[];
int marks;
};
That's All I have learned today! maybe this post has an error or something is missing I am just writing this as notes of my learning lesson so please before using it anywhere verify once everything is correct or not. for more read this 👉 --- About us.
Request 🙏: - If You found any error then DO NOT FORGET TO PING ME IN COMMENT or MAIL ME From contact us page.
Thank You 4 Reading!💗💗