Thursday, November 26, 2015

Struct

Hey, fellas! Now, I will explain about STRUCT in C programming language! Yeay! Struct or structure is a way to create a new data type that can store multiple variables. Each elements in C structure is called member. If u want to access the member of the struct in C programming language, you should be declare the structure variable. It is many structure variables can be declared for same struct and memory will be allocated for each separately.
Now, I will explain how to define a C struct? To define a struct you must use the struct statement. The syntax is:

Structure tag is optional. Member definition is a normal variable definition.
You can see the example about how to access structure members, structures as function arguments, and pointers to structures from this link http://www.tutorialspoint.com/cprogramming/c_structures.htm .

Keyword typedef while using structure. Programmer generally use typedef while using structure in C programming language. Typedef or type definitions make it possible to create your own variable types.

If you want to know more about Struct in C programming language you can visit link
http://fresh2refresh.com/c/c-structures/
http://www.codingunit.com/c-tutorial-structures-unions-typedef
http://www.programiz.com/c-programming/c-structure-function

or you can watch video from
49 | Structures in C Programming Language Video Tutorial
Structure and Unions in C Programming


No comments:

Post a Comment