fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void strary_toupper( char st[][6], int n)
  5. {
  6. for(int i=0; i<n; i++) {
  7. char *j = st[i];
  8. while (*j) {
  9. *j = toupper(*j);
  10. j++;
  11. }
  12. }
  13. }
  14. int main(void)
  15. {
  16. char cs[][6] = {"turbo", "na", "dohc"};
  17.  
  18. strary_toupper(cs,3);
  19. for(int i=0; i<3; i++)
  20. cout << cs[i] << endl;
  21.  
  22. return (0);
  23. }
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
TURBO
NA
DOHC