Corsi
AccediInizia a imparare l'IA
Corsi
AccediInizia a imparare l'IA
+ 1

What is the best use case of union in C?

Although this topic has been fairly discussed here and many other forums, however I couldn't find the best use case of this feature. Yes the difference between struct and union is in their allocation of memory but why should we prefer one over the other?

c
3rd Jun 2019, 2:23 PM
Ali Anwar
Ali Anwar - avatar
1 Risposta
+ 8
https://www.sololearn.com/discuss/1240354/?ref=app https://www.sololearn.com/discuss/107633/?ref=app https://www.sololearn.com/discuss/1698728/?ref=app https://www.sololearn.com/discuss/1118608/?ref=app https://www.sololearn.com/discuss/1572021/?ref=app https://www.sololearn.com/discuss/202070/?ref=app https://www.sololearn.com/discuss/1712720/?ref=app https://www.sololearn.com/discuss/819953/?ref=app
3rd Jun 2019, 3:02 PM
Rstar
Rstar - avatar

Hai spesso domande come questa?

Impara in modo più efficiente, gratuitamente:

  • Introduzione a Python

    7,1M studenti

  • Introduzione a Java

    4,7M studenti

  • Introduzione a C

    1,5M studenti

  • Introduzione a HTML

    7,5M studenti

Vedi tutti i corsi
Popolare oggi
Where is the bug?
3 Votes
im beginner
2 Votes
Is code generated by chat GPT plagiarism?
1 Votes
Pointers cpp
2 Votes
Is it possible to convert .zip file to apk? If yes, how??
1 Votes
How to add two strings together in ts or css
1 Votes
I think the heart system is ridiculous, 5 hearts that refill after like 5 hours? That is really just crazy to me.
1 Votes
Is pro worth the money ?
1 Votes
Why can’t I use double “ in python?
0 Votes
2 cases not correct what's the problem
1 Votes