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 55 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?

More than nineteen million Americans carry the factor V gene that causes blood clots, pulmonary embolism, and heart disease.

Did you know?

In 1864, the first barbiturate (barbituric acid) was synthesized.

Did you know?

The first-known contraceptive was crocodile dung, used in Egypt in 2000 BC. Condoms were also reportedly used, made of animal bladders or intestines.

Did you know?

Hypertension is a silent killer because it is deadly and has no significant early symptoms. The danger from hypertension is the extra load on the heart, which can lead to hypertensive heart disease and kidney damage. This occurs without any major symptoms until the high blood pressure becomes extreme. Regular blood pressure checks are an important method of catching hypertension before it can kill you.

Did you know?

Patients who have undergone chemotherapy for the treatment of cancer often complain of a lack of mental focus; memory loss; and a general diminution in abilities such as multitasking, attention span, and general mental agility.

For a complete list of videos, visit our video library