What is the correct way to declare and initialize a string in C?
A. char str[10] = "Hello";
B. char str = "Hello";
C. string str = "Hello";
D. str = "Hello";
Answer: Option A
Related Questions on Arrays and Strings
A. char str[10] = "Hello";
B. char str = "Hello";
C. string str = "Hello";
D. str = "Hello";
Answer: Option A
Join The Discussion