Structure | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Structure

can somebody explain me what is structure? in Simple way...I m struggling with that

18th Oct 2018, 4:35 AM
Mohammed Nehal Ahmed
Mohammed Nehal Ahmed - avatar
1 Answer
+ 4
Strcutures are a collection of variables which differ in their data types. An array allows you to create a collection of variables or objects of the same type. But consider a situation where you want to store the name and roll number of a student. An array would not be sufficient as it can only hold any one of the above two quantities. A structure would allow you to do just that. https://code.sololearn.com/clZU3INKhYe3/?ref=app
5th Nov 2018, 3:21 PM
Aayush Bhansali
Aayush Bhansali - avatar