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

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

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.

Did you know?

The most common childhood diseases include croup, chickenpox, ear infections, flu, pneumonia, ringworm, respiratory syncytial virus, scabies, head lice, and asthma.

Did you know?

In 1835 it was discovered that a disease of silkworms known as muscardine could be transferred from one silkworm to another, and was caused by a fungus.

Did you know?

Thyroid conditions cause a higher risk of fibromyalgia and chronic fatigue syndrome.

For a complete list of videos, visit our video library