Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clarification for Rule 6.1
#1
The rule says that the plain char should only be used to store character values.

C standards says single character constant for eg. 'X' are int not char. So the following code:

char x = 'A';

is a violation of the rule as in this char x is storing a constant whose type is "int". If this is not the violation then how to interpret this rule as the all single character constants are int according to "c" standards.
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)