pholosoSethebe6691 pholosoSethebe6691
  • 21-08-2019
  • Computers and Technology
contestada

Which of the following is NOT a valid declaration for a character string?

a) char string1[3] = {“1”, “2”, ‘3’, 4}

b) char string1[12];

c) char string1[] = “this is a string”;

d) char string1[25] = “this is a string”;

Respuesta :

ExieFansler ExieFansler
  • 30-08-2019

Answer:

a) char string1[3] = {“1”, “2”, ‘3’, 4}

Explanation:

In the declaration we have a string of size 3 from which 1 block is reserved for null character and we are declaring a string of size 4 and out them two are of type string and 1 is a character and 1 is an integer.

All the other three declarations are correct they will run on the IDE.

So we can say that the answer to this question is option a.

Answer Link

Otras preguntas

Archaebacteria, protists and eubacteria are generally included in the bacterium umbrella. A. True B. False
business plan respond to questions in a non aggressive and professional manner
how many times does 7 go into 48
Which best states why the Battle of Antietam was considered a turning point in the Civil War?
Arrange the events in Emily Brontë's Wuthering Heights in correct chronological order
Calcium oxide (CaO) forms when an atom of calcium loses two electrons, giving it a +2 charge and an atom of oxygen picks up two electrons, giving it a –2 charge
Himpunan A={p,q} Berapakah banyaknya himpunan bagian dari A??
Sweat glands are located in the skin's _____. epidermis dermis fatty layer
HELP WANTED ASAP PLEASE!!!!
what kind of rainfall woulf you expect on the leeward side of a mountain?