Array MCQ Quiz in தமிழ் - Objective Question with Answer for Array - இலவச PDF ஐப் பதிவிறக்கவும்

Last updated on Mar 8, 2025

பெறு Array பதில்கள் மற்றும் விரிவான தீர்வுகளுடன் கூடிய பல தேர்வு கேள்விகள் (MCQ வினாடிவினா). இவற்றை இலவசமாகப் பதிவிறக்கவும் Array MCQ வினாடி வினா Pdf மற்றும் வங்கி, SSC, ரயில்வே, UPSC, மாநில PSC போன்ற உங்களின் வரவிருக்கும் தேர்வுகளுக்குத் தயாராகுங்கள்.

Latest Array MCQ Objective Questions

Top Array MCQ Objective Questions

Array Question 1:

Consider arr [ ] is an array in C language. What will be the effect of "arr++;" ?

  1. Base address of the array(arr) will be incremented by 1.
  2. ​Base address of the array(arr) will be incremented by the word size of the processor.
  3. Base address will be incremented by the size of the data type of array.
  4. It will cause an error.

Answer (Detailed Solution Below)

Option 4 : It will cause an error.

Array Question 1 Detailed Solution

Answer: Option 4

Explanation

Consider the following example 

#include
int main()
{
       int arr[10] = {1, 2, 3, 4, 5, 6, 7};

       arr++;
       return 0;
}

Here arr++; mean that

arr = arr + 1 ;

which is wrong we can not change the base address of an array and it will generate an error.
another way to do that is by using pointers.

#include
int main()
{
       int arr[10] = {1, 2, 3, 4, 5, 6, 7};

       int *p = arr;

       p++;
       return 0;
}

Here int *p = arr; new pointer variable will be created which will start pointing to the first element of the array.

and p++; will cause the pointer to start pointing to the next element of the array.

Array Question 2:

Consider the following ANSI C program.

#include

int main()

{

   int arr[4][5];

   int i, j;

  for(i =0; i<4; i++)

  {

    for (j =0; j<5; j++)

    {

       arr [i][j] = 10 * i + j;

    }

  }

     print("%d", *(arr[1] + 9));

     return 0;

}

What is the output of the above program?

  1. 14
  2. 20
  3. 30
  4. 24

Answer (Detailed Solution Below)

Option 4 : 24

Array Question 2 Detailed Solution

code:

#include

int main(){

int arr[4][5];

int i, j;

for(i =0; i<4; i++){

for (j =0; j<5; j++){

arr [i][j] = 10 +i + j;

}

}

print("%d", *(arr[1] + 9));

return 0;

}

Key Points

  1. C doesn't check array boundaries. A segmentation fault will only occur if you try to dereference a pointer to memory that your program doesn't have permission to access. Simply going past the end of an array is unlikely to cause that behavior. Undefined behavior is just that - undefined. It may appear to work just fine, but you shouldn't be relying on its safety.
  2. Your program causes undefined behavior by accessing memory past the end of the array. In this case, it looks like one of your str[i] = c writes overwrite the value in i.

Explanation:

*(arr[1] + 9) can be written as arr[1][9].

as C doesn't follow bound check and follow the row major ordering

arr[1][5] = arr[2][0]  / arr[1][4] will be first row of array and then arr[2][0] will be second row of array 

arr[1][6] = arr[2][1]

arr[1][7] = arr[2][2]

arr[1][8] = arr[2][3]

arr[1][9] = arr[2][4]

arr[2][4] = 10*i + j = 10*2+4 = 24

Option 4 is the answer.

Array Question 3:

Consider the following declaration of an array in ‘C’ language:

int A[6] = {1, 2, 3, 5};

Which of the following statements is true?

  1. Both A[2] and 2[A] represent the value 2.
  2. Both A[2] and 2[A] represent the value 3
  3. A[2] is the correct way to access an element of A, but 2[A] will give an error
  4. The last two elements of the array A are 3 and 5

Answer (Detailed Solution Below)

Option 2 : Both A[2] and 2[A] represent the value 3

Array Question 3 Detailed Solution

Concept:

An array is a data structure that contains a group of elements. These elements are all of the same data type, such as an integer.

To access element from an array subscript(index) and array name is required

Explanation:

Array name: A

index

0

1

2

3

element

1

2

3

5

To access 3rd element in an array A[2] or 2[A] is used.  Therefore Both A[2] and 2[A] represent the value 3

Important point:

A[0] represent the value 1st element

Array Question 4:

Consider the following C program segment.

#include

int main()
{
    char s1[7] = "1234";
    char *p;

    p = s1 + 2;
    *p = '0';

    printf("%s", s1);

    return 0;
}

What will be printed by the program?

  1. 12
  2. 120400
  3. 1204
  4. 1034

Answer (Detailed Solution Below)

Option 3 : 1204

Array Question 4 Detailed Solution

F1 R.S Shraddha 17.01.2020 D2

Where \0 is a null character 

After *p = '0';   \\s1[2] = '0'

100  101 102 103  104

1

2

0

4

\0

printf(“%s”, s1) will print all starting from address location 100 until the null character.

Output: 1204 

Array Question 5:

The largest element of an array index is called ______

  1. middle bound
  2. lower bound
  3. range
  4. upper bound

Answer (Detailed Solution Below)

Option 4 : upper bound

Array Question 5 Detailed Solution

Answer: Option 4

Explanation:

F1 Harshita Madhu 14.02.22 D1

The upper bound:

The largest index is called upper bound of the array.

The lower bound:

The smallest index is called lower bound of the array.

Range of Array:

the range of smallest element to largest index is called range of the array.

Array Question 6:

Consider a 1-D array in which the index starts from 2 and ends at 153. The address of index 2 is 1100 and each data in the array takes 4 words. What is the address of A[125] where 125 is the index?

Answer (Detailed Solution Below) 1592

Array Question 6 Detailed Solution

Data:

base address = 1100

starting index = 2

index = 125

size of element = 4 word

Formula:

Array index starts with 0:

Address of array location : base address + index × size of data

Array index starts with 2:

Address of array location : base address + (index - 2) ×size of data

Calculation

Address of A[125] = 1100 + (125 - 2) × 4

= 1100 + 123 × 4

= 1592

Array Question 7:

Consider the statement.

int val[2] [4] = {1, 2, 3, 4, 5, 6, 7, 8}; 4 will be the value of

  1. val[1] [4]
  2. val[1] [1]
  3. val[0] [4]
  4. none of these

Answer (Detailed Solution Below)

Option 4 : none of these

Array Question 7 Detailed Solution

Concept:

val[2][4] is the two-dimensional array representation with 2 rows and 4 columns

rang of rows : 0 to 1

rand of columns = 0 to 3

Explanation:

val[0][0] = 1

val[0][1] = 2

val[0][2] = 3 val[0][3] =4

val[1][0] = 5

val[1][1] = 6

val[1][2] = 7 val[1][3] = 8

Hence the correct answer is Option 4

Array Question 8:

Consider the following array declaration in the 'C' language:

int array 1[] = {2, 3};

int array2[3]={9};

What will be the output of the following print statement?

printf(“%d, %d”, array1 [1], array2 [2]);
 

  1. 2, 0
  2. 3, 0
  3. 2, 9
  4. 3, 9

Answer (Detailed Solution Below)

Option 2 : 3, 0

Array Question 8 Detailed Solution

Key Points 

An array is defined as the collection of similar types of data items stored at contiguous memory locations. Arrays are the derived data type in C programming language which can store the primitive type of data such as int, char, double, float, etc. C array is beneficial if you have to store similar elements. 

Array can be access i th index at array A,

A[ i ]= i [ A ] = *(A+ i) = *(i + A)

Given that,

int array1[ ] = {2, 3);

int array2[ 3 ] = {9};

printf(“%d, %d”, array1[1], 2[array2]);

array1 is dynamic allocation of {2,3}.

array2 is three memory cells and stores 9 at 0th index of array2.

F1 Engineering Arbaz 16-06-2023 Neha B D1

printf(“%d, %d”, array1[1], 2[array2]);

array1[1]= 1st index at array1 = 3

 array2 [2]= 2nd index at array2 = 0

Hence the correct answer is 3, 0.

Array Question 9:

Consider a two dimensional array X[-10…5, 7….15] in which  staring location is at 250. If every data of given array takes 4 byte of space and store in column major order, then what will be the location of A[2][10] 

Answer (Detailed Solution Below) 490

Array Question 9 Detailed Solution

The correct answer is 490.

Concepts:

Array:

An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.

Explanation:

The given data,

Range of given array: [-10...5,7......15]

A[2][10]= ?

A[-10][7] = 250= starting location = base location of the array.

b= base of the index= starting index.

u= upper of the index= upper index.

r1= (u1-b1+1)= column size= number of rows

r1=(u2-b2+1) =row size= number of columns

Number of rows

r1 =5 – (–10) + 1= 16

Number of columns:

r2= 15 – 7 + 1 = 9

Array size: A16 x 9

Formula:

Row major order:

A[i][j] = base location of the array+ {( i - b1 ) r2 + ( j - b2) } x c

Column major order:

A[i][j] = base location of the array+ {( j - b2 ) r1 + (i - b1) } x c

where is c = count = size of each element.

Calculation:  

column-major order

A[i][j] = base location of the array+ {( j - b2 )r1+ (i-b1) } x c

c = 4

A[2][10] = 250 + {(10 - 7)16 + (2- (- 10)) } x 4

A[2][10] = 250 + {(3)16 +12 } x 4

A[2][10] = 250 + {48 +12 } x 4

A[2][10] = 250 + 240

A[2][10] = 490

Hence the correct answer is 490.

Array Question 10:

Which is the non – primitive data structure?

  1. Integer
  2. Character
  3. Arrays
  4. Boolean

Answer (Detailed Solution Below)

Option 3 : Arrays

Array Question 10 Detailed Solution

  • Basic data type (Primitive Data Structure): Integer, Real, Boolean, Character. Primitive data types are also called simple data types since they cannot be further divided
  • Non- primitive data Structure is divided into linear data structure and non-linear data structure


1. Linear data structure: elements(data) form a sequence or a linear list

Examples: Arrays, Linked List, Stacks and Queues

2. Non-Linear data structure: data are not arranged in sequence

Example: Trees, Graphs

Get Free Access Now
Hot Links: teen patti cash game teen patti win teen patti live