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

What type of competition does a pizza parlor vs. an ice cream shop represent?
Refer to the above diagram of the market for corn. If the price in this market is $2 per bushel, then there will be? (The graph and answer choices are in the pi
help me, i need the answers quickly
Hey can anyone pls compare and contrast The Princess and the Tin Box and All That Glitters is Not Gold in the image below!!!!
question : below pictureis attached
What is the meaning of life?
A machine factory makes two and one 4th pounds of nails in one and a half hours at what rate in pounds per hour does the machine make nails
Priya starts with $50 in her bank account. She then deposits $20 each week for 12 weeks. Write an equation that represents the relationship between the dollar a
Explain how social and economic groups (the work- ing class, middle class, and upper class) experienced city life and culture similarly and differently. Respon
Pls I need the answer quick