a) Write a function named capitalizethat capitalizes all letters in its argument. The argument will bea null-terminated string containing arbitrary characters, not justletters. Use array subscripting to access the characters in thestring. Hint: Use the toupper function to convert each character toupper-case. b) Rewrite the capitalize function,this time using pointer arithmetic to access the characters in thestring. a) Write a function named capitalizethat capitalizes all letters in its argument. The argument will bea null-terminated string containing arbitrary characters, not justletters. Use array subscripting to access the characters in thestring. Hint: Use the toupper function to convert each character toupper-case. b) Rewrite the capitalize function,this time using pointer arithmetic to access the characters in thestring.
Explanation / Answer
please rate - thanks a) #include #include #include void capitalize(char[]); int main() {char a[]="This Is a String@!#"; printf("Starting string: %s ",a); capitalize(a); printf("Final string: %s ",a); getch(); return 0; } void capitalize(char a[]) {int i=0; while(a[i]!='') {if(a[i]>='a'&&a[i]='a'&&*a