69 668
Assignments Done
Successfully Done
In February 2019

Answer to Question #56419 in C++ for raneem

Question #56419
Write a program that reads a string them changes capital letters with small letters and
small letters with capital letters?

can you please help me know the answer :(?
Expert's answer
#include <stdio.h>
#include <ctype.h>

int main() {
char buffer[100];

for(char *c=buffer; *c!='\0'; c++) {
if(*c>='A' && *c<='Z') *c=tolower(*c);
else if(*c>='a' && *c<='z') *c=toupper(*c);


return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions