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

Transitivity refers to a. the ability to think with abstract concepts. b. being able to compare all items in a set to all other items. c. hypothetical thinking.
Select the correct equation. The focus and directrix of a parabola are shown. What is the equation of the parabola?
Cardiac triggering monitors cardiac motion by coordinating the rf excitation pulse with the ______ wave of cardiac systole.
Which of the following statements from the background information best explains the meaning of a revolution? 1. “As in North America, a combination of ideology,
Meaning of U.R.L in computer​
OA= What Is OA= Help me please!!! Thanksss
In the early asylums, treatment for mental illness began with the intention to provide?
Geometry Question!! PLEASE HELp
The graph of f(x) = x2 is translated to form g(x) = (x – 5)2 + 1. On a coordinate plane, a parabola, labeled f of x, opens up. It goes through (negative 2, 4),
please help me with this question as soon as possible