Skip to main content
Issac
Want to make a difference by making some contribution to open source community!
Asked a question 2 years ago

how to declare struct in c?

Where am I?

In answerQA you can ask and answer questions and share your experience with others!

Robert David
Today I accept that for some people, I may be too much or too little. But for the people who deserve me, I am just right.

The general syntax for a struct declaration in C is:

struct tag_name {

  type member1;

  type member2;

  /* declare as many members as desired, but the entire structure size must be known to the compiler. */

};