मराठी

Identify the correct statement. (a) double dr = new double; (b) double dr = new double; (c) double dr[] = new dr [5]; (d) double dr [] = new double [5];

Advertisements
Advertisements

प्रश्न

Identify the correct statement.

पर्याय

  • double dr = new double;

  • double dr = new double;

  • double dr[] = new dr [5];

  • double dr [] = new double [5];

MCQ
Advertisements

उत्तर

double dr [] = new double [5];

Explanation:

follows perfect Java syntax for array declaration and instantiation. It explicitly declares a reference variable dr for a double array (double dr[]) and allocates memory for exactly 5 elements using the new keyword followed by the data type and size (new double [5]).

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 2: Class as the Basis of all Computation - Exercises [पृष्ठ ६४]

APPEARS IN

रूपा पंडित Computer Applications [English] Class 10 ICSE
पाठ 2 Class as the Basis of all Computation
Exercises | Q 1. (v) | पृष्ठ ६४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×