0
Struct In C
Why would you use struct in C it seems like something that you wouldn’t use often.
3 Respuestas
+ 1
No, we need Structures very often in real life programming. Just think like, you are asked to program an attendance sheet for a school. Now, won't it help you if you had a way to bundle the student's name and roll number into a single variable? Well, that's one case where structures are used. Generally, data structures are useful in programming. So try to learn them. Happy learning ;)
+ 1
Whats My True Name??? Yeah you are right. Well then, think of this situation then. You are designing a game, for that you have to make a data structure which holds the player's hit points, attack and number of items in inventory, into a single variable. A structure would be helpful there. The point is, structures, in general, data structures are helpful in making complex data structures out of fundamental types
0
But if you were going to program an attendance sheet wouldn’t SQL or Python be a better fit since they are better suited for data science and alike.