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

Long-term mental and physical effects from substance abuse include: paranoia, psychosis, immune deficiencies, and organ damage.

Did you know?

Illness; diuretics; laxative abuse; hot weather; exercise; sweating; caffeine; alcoholic beverages; starvation diets; inadequate carbohydrate consumption; and diets high in protein, salt, or fiber can cause people to become dehydrated.

Did you know?

About one in five American adults and teenagers have had a genital herpes infection—and most of them don't know it. People with genital herpes have at least twice the risk of becoming infected with HIV if exposed to it than those people who do not have genital herpes.

Did you know?

Oxytocin is recommended only for pregnancies that have a medical reason for inducing labor (such as eclampsia) and is not recommended for elective procedures or for making the birthing process more convenient.

Did you know?

Vital signs (blood pressure, temperature, pulse rate, respiration rate) should be taken before any drug administration. Patients should be informed not to use tobacco or caffeine at least 30 minutes before their appointment.

For a complete list of videos, visit our video library