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

For loop, write a c++ program for the sum of 10 numbers and print out the a...

write a c++ program for the sum of 10 numbers and print out the average

Pointer declaration for class, P o i n t e r d e c l ...

P o i n t e r d e c l a r a t i o n f o r C l a s s : M m; M * p m; / / C la ss M i s d e c l a r e d a s

#Program, Write a program that accepts two real numbers from a user and a s...

Write a program that accepts two real numbers from a user and a select code. If the entered select code is 1, have the program add the two previously entered numbers and display t

What is memory allocation, What is memory allocation? Memory Allocation...

What is memory allocation? Memory Allocation : It is the method of allocating memory storage to program in such that the program can be run.

Question, wap to calculatethe volume of cone,cylinderand sphere

wap to calculatethe volume of cone,cylinderand sphere

Probabilistic hough transform, Two kinds of line detection are implemented ...

Two kinds of line detection are implemented in OpenCV, the Hough Transform and the probabilistic Hough transform. Assume that there are n feature points in an image and that it tak

Poker room auto seat program, Poker Room auto seat program Project Descr...

Poker Room auto seat program Project Description: I want a script for an online poker site. It requires to be scanning all the available tables and when the table meets certa

Can i drop the [] while deleteing array of some built-in , Can I drop the [...

Can I drop the [] while deleteing array of some built-in type (char, int, etc)? A: No. you can't Sometimes programmers think that the [] in the delete[] p only present so the

Is there any difficulty with the following : char*a=null; , Is there any di...

Is there any difficulty with the following : char*a=NULL; char& p = *a;? A: The result is indeterminate. You must never do this. A reference has to always refer to some object.

Padovan sequence, #write a program that counts the number of occurances of ...

#write a program that counts the number of occurances of the string in the n-th padovan string p(n)

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