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

I need a simple diagram that I can easily understand tectonic plates...
How does being physically fit affect your resting heart rate?
What is 3/4 of 16 pennies
What is 2 to the 10th power in scientific notation
how can i fix this fragment sentancei moved to the United States when i was young it was easy to learn english, my parents were already here, they knew english
what famous ancient greek mathematician came up with an approximate value of pi by circumscribing and inscribing circles in and around regular polygons?
Which statement is inconsistent with the concept of isotopes of the same element? a. Isotopes have the same number of protons b. Isotopes have the same atomic n
16x²-81=0 solve the following quadratic equation
Compare and contrast centipedes and millipedes
Why is technology a challenge to skills management ?How can businesses selling the same goods/services eliminate competition ?