0

can I use char as a variable in the if statement?

12th Aug 2016, 12:48 AM
izuchukwu uchegbu
izuchukwu uchegbu - avatar
7 Answers
+ 4
Of course. char c = 'c'; if (c == 'c') { //is c } else { //is not c }
12th Aug 2016, 2:15 AM
Cohen Creber
Cohen Creber - avatar
+ 2
of course.....you can. Cohen craber has illustrated it nicely with the example.
12th Aug 2016, 5:05 PM
Atul Anand Jha
Atul Anand Jha - avatar
+ 1
yes ! you can use it
12th Aug 2016, 11:28 AM
Prince Raj
Prince Raj - avatar
0
yes definatly! !
13th Aug 2016, 5:18 PM
Asma Khan
Asma Khan - avatar
0
yes,my dear you can use it any no. of times
16th Aug 2016, 7:01 AM
Pratik Rath
Pratik Rath - avatar
0
yes u can. It depend upon the situation
2nd Sep 2016, 11:14 AM
Ayush Jaiswal
0
Yes
14th Sep 2016, 9:13 AM
Binit Acharya
Binit Acharya - avatar