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
L is a text and can be composed of any of the characters {, }, (, ) , and P, where P will represent the instruction. L will contain single spaced characters where each character

What is  T y pe C a s t Op er a t o r :   T h e f l o a t c a n b e c o n v e r t e d t o i n t e g e r v a l u


I am an online tutor who can teach computer science and programming language. Is there any requirement for this?


A: Multiple providers of libraries might employ common global identifiers causing a name collision whereas an application attempt to link with two or more such libraries. The names

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.

Op e r a t o r P r e c e d e n c e a n d A s s o c i a t i v e l y : T h e op e r a t o r p r e c e d e n c e a n d i

Compiler Design - Limit In The Method Instructions

Hello, Do you have any idea for programming project to simulate a network attack (threat) mechanism or a defense mechanism. Can I get some suggestions for this. Please include th