fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8. char str[10] = "IITR";
  9.  
  10.  
  11. for (int i=0; i<10; i++){
  12. cout<<str+i<<endl;
  13. cout<<*(str+i);
  14. }
  15. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
IITR
IITR
ITR
TR
R