Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
1.8k views
in Information Technology by (105k points)
closed by

If integer requires two bytes space, then what will be the size of the following 'C’ array?

int array[3][4]=(0);


1. 24 bytes
2. 12 bytes
3. 7 bytes
4. 14 bytes

1 Answer

0 votes
by (110k points)
selected by
 
Best answer
Correct Answer - Option 1 : 24 bytes

 An array is defined as the collection of similar types of data items stored at contiguous memory locations. 

int array[3][4] = (0);

Here Array is an integer array. which is in a two-dimensional array of 3 rows and 4 columns. So each row has 4 elements and there are three rows.

Hence total number of elements = 3 x 4 =12

Each element of size = 2 bytes.

So size of array is = 12 x 2 bytes =24 bytes.

Hence the correct answer is 24 bytes.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...