Advertisements
Advertisements
Question
Give reason whether the following assignment is correct or not.
char ch = "apps";
One Line Answer
Solution
This assignment is incorrect because "apps" is a string literal, not a character literal, and it is assigned to a variable of the char data type.
shaalaa.com
Is there an error in this question or solution?
Chapter 1.03: Values and Data Types - EXERCISES [Page 33]