What is a structure | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

What is a structure

Structure

30th Oct 2019, 12:01 PM
Radoslav Kostov
Radoslav Kostov - avatar
5 Answers
+ 12
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. Syntax: struct structure_name { DataType variable 1 DataType variable 2 DataType variable 3 ... }structure_variables;
30th Oct 2019, 1:52 PM
Rohitman
Rohitman - avatar
+ 7
It is like a record containing fields. Look in the C tutorial for examples.
1st Nov 2019, 3:30 AM
Sonic
Sonic - avatar
+ 7
C and C++ structs are very similar.
1st Nov 2019, 3:31 AM
Sonic
Sonic - avatar
+ 5
Structure is a group of variables of different data types represented by a single name ... struct struct_name{ DataType Member1_name; DataType Member2_name; ..... };
31st Oct 2019, 2:34 AM
Indira
Indira - avatar
+ 2
HTML-structure.
30th Oct 2019, 5:16 PM
Bahadur Arzimbetov
Bahadur Arzimbetov - avatar