October 20, 2023
October 20, 2023
October 20, 2023
###### Programming
October 20, 2023
 Question 301
How many values can be held by an array A(–1,m;1,m) ?
 A m B m2 C m(m+1) D m(m+2)
Question 301 Explanation:
int A[n] means “n” elements and index starts from 0 to n-1.
→ Similarly, int A[n][n] means both column and rows has “n” elements and total elements are n*n nothing but n2 elements.
In the given example ,an array A(-1,m;1,m)
→ In which rows indexes are -1,0,1,2, and so on up to m then total rows are “m+2”.
→ columns consist of 1,2,3 and so on up to m then total elements in columns are “m”.
Total elements are (m+2)*m
Question 301 Explanation:
int A[n] means “n” elements and index starts from 0 to n-1.
→ Similarly, int A[n][n] means both column and rows has “n” elements and total elements are n*n nothing but n2 elements.
In the given example ,an array A(-1,m;1,m)
→ In which rows indexes are -1,0,1,2, and so on up to m then total rows are “m+2”.
→ columns consist of 1,2,3 and so on up to m then total elements in columns are “m”.
Total elements are (m+2)*m