0
What is structure?program for structure.
3 Answers
+ 6
Edited: In C, Structure is collection of elements with different data types. Its similar like arrays but it can have different datatypes.
Syntax:
struct strict_name
{
int var;
char var1;
float var3;
}struct_variable;
+ 2
@Mr.Robot that is true in C not in C++ (I know it is strange but they changed it to adapt it to OOP)
+ 1
Structure is a class where the default privacy is "public" (you use it generally when you want a class with everything public)