fork download
  1. #include <stdio.h>
  2.  
  3. void stringToUpper(char str[]) {
  4. for (int i = 0; str[i] != '\0'; i++) printf("%c", str[i] - ((str[i] >= 'a' && str[i] <= 'z') ? 32 : 0));
  5. }
  6.  
  7. int main(){
  8. stringToUpper("All your BASE are Belong to US!");
  9. }
  10.  
  11. //https://pt.stackoverflow.com/q/523944/101
Success #stdin #stdout 0s 5568KB
stdin
Standard input is empty
stdout
ALL YOUR BASE ARE BELONG TO US!