Compute the results of ch nn an ff if char chaC42 int nn3aG
Compute the results of ch, nn, an ff if: char ch=\'a\'-\'C\'+42\'; int nn=3+\'a\'-\'G\'; float ff=1.0+\'a\'/\'X\';
Solution
1)
 char ch=\'a\'-\'C\'+42
ascii code for \'a\'=97,\'C\'=67
 so 97-67+42=72
 char value of 72 is H, so value of ch will be H.
2)
 int nn=3+\'a\'-\'G\';
 ascii code for \'a\' = 97, \'G\'=71
 => 3+97-71=29
 so value of nn is 29
3)
 float ff=1.0+\'a\'/\'X\';
 ascii value for \'a\'=97, \'X\'=88
 => 1.0+97/88
 =>1.0+1
 =>2
so value of ff will be 2
Thanks a lot

