This topic contains a solution. Click here to go to the answer

Author Question: The statement on line 1 ________ the array while the statement on line 2 ________ the array. 1 var ... (Read 56 times)

plus1

  • Hero Member
  • *****
  • Posts: 676
The statement on line 1 ________ the array while the statement on line 2 ________ the array. 1 var c; 2 c = new Array( 12 );
 
  a) declares, initializes
  b) initializes, declares
  c) declares, allocates
  d) allocates, declares

Question 2

Which of the following is the proper method to dynamically allocate memory to an array of 100 elements?
 
  a) var c = new c 100 ;
  b) var c = new c( 100 );
  c) var c = new Array 100 ;
  d) var c = new Array( 100 );



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by a Subject Expert

guyanai

  • Sr. Member
  • ****
  • Posts: 349
Answer to Question 1

Ans: (c)

Answer to Question 2

Ans: (d)





 

Did you know?

According to the CDC, approximately 31.7% of the U.S. population has high low-density lipoprotein (LDL) or "bad cholesterol" levels.

Did you know?

Vaccines prevent between 2.5 and 4 million deaths every year.

Did you know?

Blood is approximately twice as thick as water because of the cells and other components found in it.

Did you know?

When blood is exposed to air, it clots. Heparin allows the blood to come in direct contact with air without clotting.

Did you know?

The effects of organophosphate poisoning are referred to by using the abbreviations “SLUD” or “SLUDGE,” It stands for: salivation, lacrimation, urination, defecation, GI upset, and emesis.

For a complete list of videos, visit our video library