[Solved] How can I use the function toupper() in this code? [closed]


You need to toupper every single character, e.g.

while( (leido = read(0,&buffer,sizeof buffer)) > 0){
   for (int i=0; i<leido; i++) {
      buffer[i] = toupper((unsigned char)buffer[i]);
   }
   retorno = write(1,&buffer,leido);
}

2

solved How can I use the function toupper() in this code? [closed]