C Array Questions and Answers

Practice Mode
Showing 10 of 108 questions
Q61
In case of a strictly lower triangular array which of the following is true.
  • A All the elements above diagonal element are zero.
  • B All the elements lower diagonal element and also the diagonal elements are zero.
  • C All the elements above diagonal element and also the diagonal elements are zero.
  • D All the elements lower diagonal elements are zero.
Answer: Option C
Q62
The total numberr of of non-zero elements in a lower triangular arrays with n rows is
  • A n
  • B (n+1) /2
  • C n(n+1)/2
  • D n+a
Answer: Option C
Q63
Which of the following declarations for a two dimentional integer type array called matrix for 3 rows and 5 columns ?
  • A int matrix [3] [5];
  • B int matrix [3, 5];
  • C int matrix [1+2] [2+3]
  • D Both a and c
Answer: Option D
Q64
Find the output void main ( ) { int a[2, 3] ={ (2, 3), (4, 5), (6, 7)}; printf("%d", a[0]); }
  • A 2 3
  • B Address of the array
  • C 2
  • D Compilation Error
Answer: Option A
Q65
Find the output void main ( ) { int arr[2]={(1, 2), (2, 3)}; printf("%d", sizeof (arr+1)); }
  • A 4
  • B Compilation error
  • C 8
  • D 2
Answer: Option D
Q66
which is the wrong one about array from the following ?
  • A sizeof () operator doesn't report the size of an array which is parameter to a function.
  • B Arrays are just constantj pointers.
  • C int a[20] is declaration cum definition.
  • D Memory allocation is static for an array.
Answer: Option C
Q67
Which of the following array initialization is not possible ?
  • A int 5[int]={1, 2, 3, 4, 5 };
  • B int a[5]={1, 2, 3, 4, 5};
  • C float a[ ]={'a','b','c','d','e'};
  • D int b[ ]={1, 2};
Answer: Option A
Q68
What will be the adjacent element of a [0][1] in the array a[2][2].
  • A a [0] [1]
  • B a [0] [0], a[1] [0], a[1] [1]
  • C a[0] [0], a[1] [1]
  • D a [0] [0], a[0] [1]
Answer: Option B
Q69
Array is which kind of data type.
  • A Fundamental data type.
  • B User-defined data type.
  • C Derived data type.
  • D It's not a data type
Answer: Option C
Q70
Choose the wrong one out of the following.
  • A int array [15]; Here array is not a valid identifier.
  • B All arrays except character array can not be read/displayed as a single entity, but the individual elements are read/displayed.
  • C the base address of an array is the address of the zeroth element (stanrting element)
  • D char str[20]; declares character array str having a maximum of 20 characters
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test