fork(4) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. {
  7. int i = 'abcd';
  8. char c = i; // cast form int to char -> c == 'd'
  9. cout << c; // prints 'd'
  10. }
  11.  
  12. {
  13. char c = 'abcd'; // cast form int to char -> c == 'd'
  14. cout << c; // prints 'd'
  15. }
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
dd