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 50 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
Gracias!


dyrone

  • Member
  • Posts: 322
Reply 3 on: Yesterday
:D TYSM

 

Did you know?

More than 30% of American adults, and about 12% of children utilize health care approaches that were developed outside of conventional medicine.

Did you know?

The average person is easily confused by the terms pharmaceutics and pharmacology, thinking they are one and the same. Whereas pharmaceutics is the science of preparing and dispensing drugs (otherwise known as the science of pharmacy), pharmacology is the study of medications.

Did you know?

Pubic lice (crabs) are usually spread through sexual contact. You cannot catch them by using a public toilet.

Did you know?

Cutaneous mucormycosis is a rare fungal infection that has been fatal in at least 29% of cases, and in as many as 83% of cases, depending on the patient's health prior to infection. It has occurred often after natural disasters such as tornados, and early treatment is essential.

Did you know?

Asthma attacks and symptoms usually get started by specific triggers (such as viruses, allergies, gases, and air particles). You should talk to your doctor about these triggers and find ways to avoid or get rid of them.

For a complete list of videos, visit our video library