Solved

What Is Wrong with the Following Attempted C-String Declaration and Initialization

Question 41

Multiple Choice

What is wrong with the following attempted c-string declaration and initialization?
Char str1[5]={'a', 'b', 'c'};


A) There are only 3 values in the braces
B) The single quotes should be double quotes
C) The values do not constitute a c-string
D) nothing

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents