+ 1

How can we use a array with different type of elements in it ?

As we know array is a collection of same type of data or we can say homogenous data . Is it possible to use different type of elements in an array.

23rd Feb 2020, 7:11 PM
Vikas Kumar
Vikas Kumar - avatar
2 Réponses
+ 3
you can use structures and unions for that
23rd Feb 2020, 7:48 PM
Spandan Bhattacharya
Spandan Bhattacharya - avatar
+ 1
No. For that purpose heterogeneous Data structures are introduced..(lists, structs,...etc)..
23rd Feb 2020, 7:16 PM
Jayakrishna 🇮🇳