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

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

      }

   }

}

Posted Date: 3/8/2013 6:22:30 AM | Location : United States







Related Discussions:- Using functions create a program, Assignment Help, Ask Question on Using functions create a program, Get Answer, Expert's Help, Using functions create a program Discussions

Write discussion on Using functions create a program
Your posts are moderated
Related Questions
For the circuit shown in Figure, verify the p.d. across resistor R3. If the total resistance of the circuit is 100Ω, verify the current flowing by resistor R1. Find also the

Debug the following program to calculate N! #include using namespace std; main() {             int N, factorial=1;             cout             cin >> N;

In this sub-task will you implement three functions for the final three function prototypes that will do exactly the same as the three functions that you have just written. This ti

Hello. I need a solution for this assignment. It is for C++ Language: Create a BusinessPartner class that contains a first name, company name, and a telephone number. Create a Con

array of class objects and single inheritance

The zipped folder int_collection.zip (downloaded from Blackboard) contains an abstract class AbstractIntCollection and two interfaces: IntList and IntStack. The abstract class cont


how is it made

Conversion Functions Conversion functions are member functions used for the following purposes: 1. Conversion of object to basic data type. 2. Conversion of basic data ty

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b