English

Double x [ ]={2.5,4.5,5.5,6.4}; occupies ______ bytes. - Computer Applications

Advertisements
Advertisements

Question

double x [ ]={2.5,4.5,5.5,6.4}; occupies ______ bytes.

Options

  • 16

  • 4

  • 8

  • 32

MCQ
Fill in the Blanks
Advertisements

Solution

double x [ ]={2.5,4.5,5.5,6.4}; occupies 32 bytes.

Explanation:

The array contains four elements: 2.5, 4.5, 5.5, and 6.4, each of type double. Since a double occupies 8 bytes, the total memory used by the array is 8 × 4 = 32 bytes.

shaalaa.com
  Is there an error in this question or solution?
2024-2025 (March) Official Board
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×