+ 1

Why in 2d array itialization when we use this brackets () we don't have error?

Ex: int my_array[3][2]={(1,2),(3,4),(5,6)};

27th Jul 2020, 10:32 PM
Aya Khalid
Aya Khalid - avatar
3 odpowiedzi
+ 2
Tag the language pls... Where ever you use like (1,2) in c/c++, For ex: x=(1, 2) it means x=1,and x=2 now x=1 lost and overridden by x=2.. So there it have finally { {2}, {4}, {6}} ; But It give warnings...
27th Jul 2020, 10:58 PM
Jayakrishna 🇮🇳
+ 1
Thank you all♥ Ok,the next time i will tag the language.
30th Jul 2020, 2:46 AM
Aya Khalid
Aya Khalid - avatar