#include <iostream> using namespace std; int main() { char c=("0"+3); cout<<c; return 0; }
Standard input is empty
prog.cpp:4:12: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] char c=("0"+3); ~~~^~ prog.cpp:4:12: note: use array indexing to silence this warning char c=("0"+3); ^ & [ ] prog.cpp:4:6: error: cannot initialize a variable of type 'char' with an rvalue of type 'const char *' char c=("0"+3); ^ ~~~~~~~ 1 warning and 1 error generated.
Standard output is empty