in rpeanut implement the char getchar and void


In rPeANUt implement the "char getchar()" and "void printstring(char *str)" functions. Using these functions implement the following:

void main() {

   while (1) {

      char c = getchar();

      if (c == 'a') {

         printf("A - apple\n");

      } else if (c == 'b'){

         printf("B - ball\n");

      } else if (c == 'c'){

         printf("C - cat\n");

      } else {

         printf("%c - ??\n", c);

      }

   }

}

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: in rpeanut implement the char getchar and void
Reference No:- TGS0209408

Expected delivery within 24 Hours