How do you initialize a C-string called Cheer which will contain “Hooray” (without the quotes.) ?

A. char Cheer[7] = {‘H’, ‘o’, ‘o’, ‘r’, ‘a’, ‘y’, ‘\0’};
B. char Cheer[7] = “Hooray”;
C. char cheer[7] = “Hooray”;
D. A and B

D. A and B

Computer Science & Information Technology

You might also like to view...

By default, Word 2010 documents are saved with a ________ file extension

A) .docx B) .dot C) .dotm D) .doc

Computer Science & Information Technology

Attempting to copy a larger string value into the destination array using strcpy causes the copy to overflow the destination array beginning with the memory area immediately following the last array element.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology