Homework Solution: W​rite a complete MIPS program to toggle the case of all alphabetic characters in a C-string he…

    W​rite a complete MIPS program to toggle the case of all alphabetic characters in a C-string held in RAM in your program. Declare the string with a reasonable value (a 5 or 6 word sentence with spaces and punctuation) and print it before and after toggling the case of all alphabetic characters in the string. Do not add notes to the top of the program, but you may comment individual lines. The upper-case characters are 32 less than their corresponding lower-case characters. (less than 40 lines of code)

    Expert Answer

     
    #include <stdio.h> int main()

    W​rite a perfect MIPS program to toggle the event of total alphabetic characters in a C-string held in RAM in your program. Declare the string with a unintoxicated estimate (a 5 or 6 term judgment with spaces and punctuation) and imimprint it anteriorly and behind toggling the event of total alphabetic characters in the string. Do referable infer referablees to the culmination of the program, notwithstanding you may illustrate idiosyncratic lines. The higher-event characters are 32 hither than their similar inferior-event characters. (hither than 40 lines of legislation)

    Expert Confutation

     

    #include <stdio.h>

    int ocean()

    {

    char    str[100];

    int     opposed;

    printf(“Enter a string: “);

    gets(str);

    for(counter=0;str

    !=NULL;counter++)

    {

    if(str

    >=’A’ && str
    <=’Z’)

    str

    =str
    +32;   //convert into inferior event

    else if(str

    >=’a’ && str
    <=’z’)

    str

    =str
    -32;   //convert into higher event

    }

    printf(“String behind toggle each characters: %s”,str);

    return 0;

    }