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

Author Question: How can you initialize an array of two characters to 'a' and 'b'? (Read 58 times)

jjjetplane

  • Hero Member
  • *****
  • Posts: 556

Question 1

Which of the following statements is valid?
◦ double d[] = new double[30];
◦ int i = new int(30);
◦ char[] c = new char[4]{'a', 'b', 'c', 'd'};
◦ char[] c = new char();
◦ int[] i = {3, 4, 3, 2};

Question 2

How can you initialize an array of two characters to 'a' and 'b'?
◦ char[2] charArray = {'a', 'b'};
◦ char[] charArray = new char[2]; charArray = {'a', 'b'};
◦ char[] charArray = {'a', 'b'};
◦ char[] charArray = new char[]{'a', 'b'};


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by jjjetplane on May 6, 2020

underwood14

  • Sr. Member
  • ****
  • Posts: 346
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 55% of students answer this correctly




jjjetplane

  • Member
  • Posts: 556
Reply 2 on: May 6, 2020
:D TYSM


ashely1112

  • Member
  • Posts: 347
Reply 3 on: Yesterday
YES! Correct, THANKS for helping me on my review

 

Did you know?

The first monoclonal antibodies were made exclusively from mouse cells. Some are now fully human, which means they are likely to be safer and may be more effective than older monoclonal antibodies.

Did you know?

About 80% of major fungal systemic infections are due to Candida albicans. Another form, Candida peritonitis, occurs most often in postoperative patients. A rare disease, Candida meningitis, may follow leukemia, kidney transplant, other immunosuppressed factors, or when suffering from Candida septicemia.

Did you know?

When blood is deoxygenated and flowing back to the heart through the veins, it is dark reddish-blue in color. Blood in the arteries that is oxygenated and flowing out to the body is bright red. Whereas arterial blood comes out in spurts, venous blood flows.

Did you know?

There used to be a metric calendar, as well as metric clocks. The metric calendar, or "French Republican Calendar" divided the year into 12 months, but each month was divided into three 10-day weeks. Each day had 10 decimal hours. Each hour had 100 decimal minutes. Due to lack of popularity, the metric clocks and calendars were ended in 1795, three years after they had been first marketed.

Did you know?

The senior population grows every year. Seniors older than 65 years of age now comprise more than 13% of the total population. However, women outlive men. In the 85-and-over age group, there are only 45 men to every 100 women.

For a complete list of videos, visit our video library