Structure in C Language


O LEVEL -PAPER 3rD -- M3-R4


C  LANGUAGE


STRUCTURE  IN C



structure program in c,structure in c
structure in c

SYNTAX OF STRUCTURE

structure program in c,structure in c
syntax of structure in c

Remember structure defined in c with the help "struct" keyword as shown in above. 


LOCAL DECLARATION OF STRUCTURE IN C


structure program in c,structure in c
local declaration of structure in c
Local declaration of structure means when structure declared within main() body/block as 
shown in above .

GLOBAL DECLARATION OF STRUCTURE IN C


structure program in c,structure in c
global declaration of structure in c
Global declaration of structure means when structure declared outside the main() body/block as
 shown in above .


MEMORY CONSUMED BY STRUCTURE



structure program in c,structure in c
memory consumed by structure 

INITIALIZATION OF STRUCTURE VARIABLE


1ST at the time of declaration of variable

structure program in c,structure in c
Initialization of structure variable in c

 2ND after declaration of variable


Initialization of structure variable in c



COPY STRUCTURE DATA OF TWO VARIABLE

structure program in c,structure in c
copy of structure data of two variable in c
NOTE :--Here we can copy structure data type of one variable i.e today into another i.e d1 in two way, for example first way is that you can copy all data into at a time i.e d1=today; or you can copy one by one i.e d1.d=today.d; d1.m=today.m; d1.y=today.y; .One thing to remember for campus or interview point of view that struct is keyword that always used while declared any user defined variable in structure and when ever you used the variable which declared with help of struct keyword i.e today or d1 for initializing the value then used dot operator i.e today.d,today.m or d1.d,d1.m and so on... if this article is helpful then please like and share 
and if you have any query  then please comments in comments section..

Comments

Popular posts from this blog

Important Announcements(download all my book free)

O LEVEL- INTERNET TECHNOLOGY & WEB DESIGN

Call by Reference with Pointer in C Language part-4-a