Skip to main content

Posts

Showing posts from January, 2017

Introductution To Structures In C Language

About Structure:- Arrays allow to define a type of variables that can hold several data items of the same kind. Similarly, structure is another user-defined data type available in C that allows to combine data items of different kinds. Let Us Take An Real Life Example: If We want to track the following attributes about each book: 1.Title (May Be String) 2.Author(May Be String) 3.Subject (May Be String) 4.Book ID (Integer Type) Than We Have to Define A Structure Variable That Can Take This Different Type Of Data-Types. Syntax For Defining A Structure:- struct [structure_Name] { member definition; member definition; ... member definition; } [one or more structure variables]; For Information of Student The Definition of structure Will Be: struct student_data {  char name[20];  int roll_Number;  int standered;  char father's_name[20]; } std1; //structure Vaiable   Accesing Structure Members:- The Members of structure variable accesed by Dot(.) Operator.. Let Us Take...