Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
expand_more
expand_more
format_list_bulleted
Question
Chapter 12, Problem 11E
Program Plan Intro
Program Plan:
- Include the necessary header files into program.
- Define the macro named “IS_UPPER_CASE()” to find out the uppercase character.
- Define the macro named “IS_LOWER_CASE()” to find out the lowercase character.
- Define the macro named “IS_ALPHABETIC()” to find out the given letter is alphabetic or not. This macro calls both uppercase and lowercase macros to find out the character.
- Define the macro named “IS_DIGIT()” to check given character is digit or not.
- Define the main function.
- Declare the variable named “value” in type of character.
- Prompt the user and get the value.
- Call the every system function with its appropriate macro and print the result on screen.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Is it preferable to use a macro or a function?
Is it preferable to compartmentalise the extensive software into a number of smaller modules, each of which is responsible for a certain task? These sections are referred to as functions when written in the computer language C++. Is there anything more that you'd want to discuss in relation to this?
Local declarations are those that are stored in the computer's memory, but how are they stored? Using local declarations is unnecessary if the same goal can be accomplished without them. When reference parameters may be used in any function, why bother with value parameters? When it comes to processing programme data, how important are value parameters?
Knowledge Booster
Similar questions
- Question 48: Match each step in the macro-recording process with the timing of its completion. Running a macro Saving a macro Recording macro steps Naming a macro Fourth Third First Secondarrow_forwardplease help me answer this question I will give you a good rating Thank you! In c++ please 1 #include <sys/types.h> 2 #include <sys/wait.h> 3 #include <unistd.h> 4 #include <stdlib.h> 5 6 #include <iostream> 7 8 using namespace std; 9 10 11 // Given a number, this function should print the associated generation 12 // of the child. along with the child's process ID and the parent's process ID. 13 // 14 // Generations should be: 15 // 0 - Parent 16 // 1 - Child 17 // 2 - Grandchild 18 // 3 - Great Grandchild 19 // 4 - Great Great Grandchild 20 // etc. 21 // 22 // Examples: 23 // 24 // printGeneration(1): Child. pid: <pid>: ppid: <ppid> 25 // printGeneration(3): Great Grandchild. pid: <pid> ppid: <ppid> 26 // 27 void printGeneration(int generation) 28 { 29 // TODO: Add Implementation of printGeneration here 30 } 31 32 33 int main(int argc, char ** argv) 34 { 35 // TODO: The program should take a single numeric command line…arrow_forwardWhich of the following is not a requirement of structured design? A. It should be made up of a hierarchy of modules B. It should use many GOTO statements C. The code should be executed in a top-to-bottom fashion within each module D. Each module should be as independent as possible of all other modules, except its parent E. None of the abovearrow_forward
- QUESTION 1 Write a c program for a drip irrigation system design for maize crop farming for small plots. The program should calculate the crop water requirements, total water needed in gallons and the number of plots irrigated in a day. The results should be stored in a file, then the data is manipulated in the file and stored in a new file for the purpose of suiting results for other cropsarrow_forwardIn order to make use of the same virtual function in numerous forms and structures, how should a programme call it when it uses base class pointers or references?arrow_forwardHello, I need help completing and understanding this data flow diagram for this program that reads from a file and writes to the terminal screen.arrow_forward
- Write a program that defines and uses a macro to square a random number. Try one of the new random calls in your code. Using C or C++arrow_forwardPLEASE, WRITE A C++ FILE WITH THE REQUIREMENTS THAT ARE GIVEN BELOW: THE PROBLEM YOU ARE GOING TO WRITE THE CODE OF IT IS "The Cigarette Smokers". Write a C implementation of the problem and solution of the synchronization problem you are responsible with. Prepare a report as above given details. Your code must run without any error to be evaluated; otherwise, this grade will be deducted.arrow_forward(This if for mindtap on cengage, if not possible, use devc++ 5.11 but mindtap is more accurate) Instructions Consider the definition of the function main in the provided file main.cpp: The variables x, y, z, rate, and hours referred to in the bullets below are the variables of the function main. Each of the functions described must have the appropriate parameters to access these variables. Write the following definitions: Write the definition of the function initialize that initializes x and y to 0 and z to the blank character. Write the definition of the function getHoursRate that prompts the user to input the hours worked and rate per hour to initialize the variables hours and rate of the function main. Write the definition of the value-returning function paycheck that calculates and returns the amount to be paid to an employee based on the hours worked and rate per hour. The hours worked and rate per hour are stored in the variables hours and rate, respectively, of the function…arrow_forward
- Show an example of a macro parameter having a default argument initializer.arrow_forwardYou can use functions to construct subtasks that will help you manage your projects better. What algorithms do you think are necessary for handling complex programs? What role does repetition have in the design of a function?arrow_forwardIn C Creates a macro called MIN that will use 2 values and produce the smaller of the valuesarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage