Using functions create a program, C/C++ Programming

Assignment Help:

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);

      }

   }

}


Related Discussions:- Using functions create a program

Spaning tree , what is the function of spanning tree in graph algorithm?

what is the function of spanning tree in graph algorithm?

Polishing game, Byteland county is very famous for luminous jewels. Luminou...

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Working of ordered linked list, Working Ordered linked list: • Eachint...

Working Ordered linked list: • Eachinteger in the queue is stored inside of a QueueItem. The QueueItem contains the integer, and a pointer to the next item in the queue. Fo

Define the classification of operators in c language, Define the Classifica...

Define the Classification of Operators in C Language? Depending on the function performed the operator can be classified as 1. Arithmetic Operator 2. Logical Operator 3. Inc

C program to search for a given character in a string, Program is to search...

Program is to search for a given character in a string: Program is to search for a given character in a string and print point of match char *stsearch(char *string, char sea

Difference between echo and print statement, Difference between Echo and pr...

Difference between Echo and print statement. print()and echo() are language constructs in PHP, both are used to output strings. Both statements are of almost same Speed. ech

What if one forget the [] when deleteing array allocated , What if one forg...

What if one forget the [] when deleteing array allocated through new T[n]? A: All life comes to a disastrous end. It is the programmer's responsibility not the compiler's to

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd