C-Array Questions and Answers

C-Array Questions and Answers
61. In case of a strictly lower triangular array which of the following is true.

  • All the elements above diagonal element are zero.
  • All the elements lower diagonal element and also the diagonal elements are zero.
  • All the elements above diagonal element and also the diagonal elements are zero.
  • All the elements lower diagonal elements are zero.
Show Answer
62. The total numberr of of non-zero elements in a lower triangular arrays with n rows is
  • n
  • (n+1) /2
  • n(n+1)/2
  • n+a
Show Answer
63. Which of the following declarations for a two dimentional integer type array called matrix for 3 rows and 5 columns ?
  • int matrix [3] [5];
  • int matrix [3, 5];
  • int matrix [1+2] [2+3]
  • Both a and c
Show Answer
64. Find the output
void main ( )
{
int a[2, 3] ={ (2, 3), (4, 5), (6, 7)};
printf("%d", a[0]);
}

  • 2 3
  • Address of the array
  • 2
  • Compilation Error
Show Answer
65. Find the output
void main ( )
{
int arr[2]={(1, 2), (2, 3)};
printf("%d", sizeof (arr+1));
}

  • 4
  • Compilation error
  • 8
  • 2
Show Answer
66. which is the wrong one about array from the following ?
  • sizeof () operator doesn't report the size of an array which is parameter to a function.
  • Arrays are just constantj pointers.
  • int a[20] is declaration cum definition.
  • Memory allocation is static for an array.
Show Answer
67. Which of the following array initialization is not possible ?
  • int 5[int]={1, 2, 3, 4, 5 };
  • int a[5]={1, 2, 3, 4, 5};
  • float a[ ]={'a','b','c','d','e'};
  • int b[ ]={1, 2};
Show Answer
68. What will be the adjacent element of a [0][1] in the array a[2][2].
  • a [0] [1]
  • a [0] [0], a[1] [0], a[1] [1]
  • a[0] [0], a[1] [1]
  • a [0] [0], a[0] [1]
Show Answer
69. Array is which kind of data type.
  • Fundamental data type.
  • User-defined data type.
  • Derived data type.
  • It's not a data type
Show Answer
70. Choose the wrong one out of the following.
  • int array [15]; Here array is not a valid identifier.
  • All arrays except character array can not be read/displayed as a single entity, but the individual elements are read/displayed.
  • the base address of an array is the address of the zeroth element (stanrting element)
  • char str[20]; declares character array str having a maximum of 20 characters
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test