fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. char a[3] ={'A','B','C'};
  6. int b= 0;
  7.  
  8.  
  9.  
  10. for(int i=0;i<3;i++){
  11. b = (unsigned int)a[i];
  12. cout<< "a["<<i<< " ] = "<<a[i]<< " : " << b<<endl;
  13.  
  14.  
  15. }
  16.  
  17. // your code goes here
  18. return 0;
  19. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
a[0 ] = A  : 65
a[1 ] = B  : 66
a[2 ] = C  : 67