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

Which is a structure that contains the cell’s hereditary information and controls the cell’s growth and reproduction?
Is cutting grass of physical or chemical change
what is another way to write 9 times 200
how might being landlocked affect the economies of these countrie
to convert a distance of 4500 yards to miles, which ratio could you multiply by
The lengths of the of sides of the triangle RST are consecutive odd integers. The perimeter of the triangle is 63 meters. What is the length of the longest side
It takes 24 minutes for 8 people to paint 8 walls. How many minutes does it take 12 people to paint 12 walls?
Mrs.Hamilton drove 4,756 miles last month. her husband drove 2,368 miles last month. to the nearest thousand, about how many more miles did Mrs.Hamilton drive t
1. You just visited your doctor and he suggested you are at risk for heart disease. Which type of lipid should you avoid eating large amounts of? Carbohydrates
what made mycenaeans rich