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

A store sells 6 oranges for $9.00. Crystal sends 24 oranges for her mom. How much money is crystal going to spend? Explain.
find the area of a playing field whichs area is 15 meters
Describe how traits are inherited through sexual reproduction? Please help
Why does the Northern Hemisphere experience seasons? * A. Earth is closer to the Sun during one half of the year than it is during the other half of the year. B
Defintion,part of speechand scentence for the word misgiving
explain how the process of mitosis helps an organism grow in size
Divide $120 in the ratio 1:2:3
What's the answer ?????
How do you think the blues emerged as a main musical form of the harlem renaissance?
64 POINTS!!!!!!!!!!!! Where can you use the Pythagorean Theorem in the real world? Describe a situation and explain how you would apply the Pythagorean Theorem.