Computer Science, asked by arunapratap143, 2 months ago

what are structures? explain how you will initialize with respect to structures

Answers

Answered by Anonymous
2

Structure is a user-defined datatype in C language which allows us to combine data of different types together. Structure helps to construct a complex data type which is more meaningful. It is somewhat similar to an Array, but an array holds data of similar type only. ... In structure, data is stored in form of records.

Means, you can initialize a structure to some default value during its variable declaration. Example: // Declare and initialize structure variable struct student stu1 = { "Pankaj", 12, 79.5f }; Note: The values for the value initialized structure should match the order in which structure members are declared.

Similar questions