fork download
  1. #include <iostream>
  2. using namespace std;
  3. #include <string.h>
  4.  
  5. char * Myarr[]={"str1 "};
  6.  
  7. int main()
  8. {
  9. cout<<sizeof(Myarr)/sizeof(Myarr[0]);
  10. char **p=Myarr;
  11. // cout<<p<<endl;
  12. p++;
  13. // cout<<p;
  14. int j=0;
  15. for(int i=0;i<sizeof(Myarr);i++)
  16. {
  17. /* if(**p++==0x00){
  18. j++;
  19. cout<<j<<","<<endl;
  20.  
  21. }*/
  22. }
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
1