+ 2

arr[]={{6,7},{5,9},{8,2}} is this declaration valid, if yess than how? In C++.

5th Aug 2019, 12:51 PM
Piyush Srivastava
Piyush Srivastava - avatar
6 Answers
+ 13
it is a 2d array, probably you need to write arr[][] and as ~ swim ~ said please mention the language for more clear answer
5th Aug 2019, 2:03 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 12
Piyush Srivastava if its a 2d array, then here is how you will write it in in C++ : int arr[3][2]={{6,7},{5,9},{8,2}}; ~ swim ~ I need to learn it, not knowing much about it now, sounds interesting.
5th Aug 2019, 2:15 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 4
Got it swim thanks.
5th Aug 2019, 4:22 PM
Piyush Srivastava
Piyush Srivastava - avatar