Which of the following syntax correctly declares an Array in C/C++?int geeks;array geeks[20];geeks{20};int geeks[20];
Question
Which of the following syntax correctly declares an Array in C/C++?int geeks;array geeks[20];geeks{20};int geeks[20];
Solution
The correct syntax to declare an array in C/C++ is:
int geeks[20];
Similar Questions
Which of the following correctly declares an array of 10 integers in C++?int array[10];int array(10);array int[10];array[10] int;
What is the correct way to declare an array of 10 integers in C?int arr=10;int arr[9];int arr[];int[10] arr;int arr[10];
Which of the following statement(s) is/are correct about an array? Tick all correct answer(s). No partial marks and no negative marks.Select one or more:The expression num[1] designates the very first element in the array.The array int num[26]; can store 26 elements.The declaration num[SIZE] is allowed if SIZE is a macro.It is necessary to initialize the array at the time of declaration.
What is the correct way to declare a 2D array in C?
Which of the following declaration is illegal?a.int a = 0, b = 1, c = 2; int array[3] = {a, b, c};b.int size = 3; int array[size];c.int size = 3; int array[size] = {1, 2, 3};d.In appropriate
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.