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
Define hash functions. Explain the Division method, Mid square method and Folding method of hash functions.

Ask question #Minimum 100 words accepted program for polishing jewels#

Aim: To implement a program to convert distance given in feet and inches into meters and centimeters and vice versa. Code:                         class mcm; class

C++ Multiplayer Game Programming Project Project Description: We are seeking an experienced C++ Game Programmer to enhance clientside related aspects of MCS: Mars City Securi

Please use C or C++ to write your programs. Our homework will focus on SUN sparc machines because to exploit x86 stack-overflow is too easy. This is not just a programming assignme

what is the syntax to get a coloured output.

A company needs 200 pencils per year . you cannot simply use this price as the cost of pencils two years from now. Because of inflation the cost is likely to be higher than it is

I need Asp .net Facebook app project completion Project Description: We are urgently seeking a few remaining items to be completed, and the project to be deployed to live.

Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.

draw the flow chart to print the fibonacci series upto n th terms