Q. Consider the below statement, can we assign a string to variable like this:
Code:char c[100]; c = "C programming";
β
Correct Answer: (B)
No
Explanation: No, we cannot assign a string like this. Because string is a character array and array type is not assignable. To assign a string to the character array, we need to use strcpy() function.