hi good morning all
i am doing ah program and am using a character like this
char grde;
my question is does it have to be initialize and if so how do i initialize. it is a character
Usually, primitive type variables do not need to be initialized. However, you could set it to some default value (' ', for example) or (since it has a numeric value) you could set it to zero.
char grde='';
when i put it like this I am getting a syntax error but when I put a letter either A or B or may C the syntax is gone but i dont want it like that . I want it to accept any letter grade. how do i do that
char grde='';
when i put it like this I am getting a syntax error but when I put a letter either A or B or may C the syntax is gone but i dont want it like that . I want it to accept any letter grade. how do i do that
I did not have nothing between the single quotes -- I had a space character in there. I thought that maybe you could use that as an unassigned grade character.