> C++ program help ?

C++ program help ?

Posted at: 2014-12-18 
What is the answer to this part of a program ?

int x=9 ;

char y=x+'d' ;

cout<< y ;

If you want to learn C++ (and not just have credit for some elective) then install a C++ compiler, wrap the code in a main() method, and see what happens.

Programming is not a flash-cards-and-regurgitation subject. You learn this stuff by putting what you see in lecture, books, sites, etc. into action.

answer? This program will output the letter m. This code is correct, but I'm not sure what you need help with.

Should be error since x is integer and your y is a string. integer adding to a string 'd' doesn't work unless you change the x integer into a string.

What is the answer to this part of a program ?

int x=9 ;

char y=x+'d' ;

cout<< y ;