How to uppercase specific character of a string in C

1 Answer

0 votes
#include <stdio.h>

int main(void) {
    char s[] = "c++ programming";
    
    s[5] = s[5] - 32; 
     
    printf("%s", s);
}
 
 
 
/*
run:
 
c++ pRogramming
 
*/

 



answered Apr 6, 2021 by avibootz

Related questions

...