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

You should not take more than 1,000 mg of vitamin E per day. Doses above this amount increase the risk of bleeding problems that can lead to a stroke.

Did you know?

Drug abusers experience the following scenario: The pleasure given by their drug (or drugs) of choice is so strong that it is difficult to eradicate even after years of staying away from the substances involved. Certain triggers may cause a drug abuser to relapse. Research shows that long-term drug abuse results in significant changes in brain function that persist long after an individual stops using drugs. It is most important to realize that the same is true of not just illegal substances but alcohol and tobacco as well.

Did you know?

Pregnant women usually experience a heightened sense of smell beginning late in the first trimester. Some experts call this the body's way of protecting a pregnant woman from foods that are unsafe for the fetus.

Did you know?

The liver is the only organ that has the ability to regenerate itself after certain types of damage. As much as 25% of the liver can be removed, and it will still regenerate back to its original shape and size. However, the liver cannot regenerate after severe damage caused by alcohol.

Did you know?

Asthma-like symptoms were first recorded about 3,500 years ago in Egypt. The first manuscript specifically written about asthma was in the year 1190, describing a condition characterized by sudden breathlessness. The treatments listed in this manuscript include chicken soup, herbs, and sexual abstinence.

For a complete list of videos, visit our video library