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 8E
Program Plan Intro
- 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 macro names “IS_SPECIAL()” to check given character is special character is not by calling the “IS_DIGIT()” and “IS_ALPHABETIC()” macros.
- Define the main function.
- Declare the variable named “value” in type of character.
- Prompt the user and get the value.
- Using “if…else” condition, call the macro “IS_SPECIAL()” which passes an argument and print the resultant values on screen.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Set a macro with symbol ABOUTME with your Student ID and Full Name in the replacement string.
The Problem: Parameterized macros can cause unexpected things to happen. Consider the following case:#define SQUARE(x) ((x) * (x))int i = 5;int j = SQUARE(i++);What's the value of j? The answer is that it's compiler dependent. And the value of i is definitely not 6. Why? Just look at the code after the macro is expanded:int j = ((i++) * (i++));From this we can see that i is increment twice. Also since the order of the operations is not specified by the C++ standard, the actual value of j is compiler dependent.
Write a macro in VBA to approximate the value of the function f(x) = tan (x)
at some nonzero point x
in radians, using a Maclaurin series through the second derivative term (MLO 3.3). Allow the point x
to be input using the InputBox() command. Calculate (a) an upper bound for the remainder term Rn
, (b) the exact value of the function at x
, (c) the true error Et
and the true relative error
(MLO 3.2) Output all these values to a blank Excel sheet, and include proper labels! Neatness counts!
Knowledge Booster
Similar questions
- In the study of assemblers what is a macro command? What is an example of macro command? When we should program a function, and when we should program a macro command?arrow_forwardIf computing the statement: x = (x * y / z); how can you use the assert macro to avoid division by zero?arrow_forwardWhich of the following commands stops a macro from developing to its full potential?arrow_forward
- Write an assembly program that has a macro maximum that finds the larger of two numbers inputted by the user. please show screenshot of output tooarrow_forwardExercisesGive an example for each of these macros to explain its work: Macro: int WIFSIGNALED (int status)This macro returns a nonzero value if the child process terminated because it received a signal thatwas not handled. Macro: int WTERMSIG (int status)If WIFSIGNALED is true of status, this macro returns the signal number of the signal thatterminated the child process. Macro: int WCOREDUMP (int status)This macro returns a nonzero value if the child process terminated and produced a core dump. Macro: int WIFSTOPPED (int status)This macro returns a nonzero value if the child process is stopped. Macro: int WSTOPSIG (int status)If WIFSTOPPED is true of status, this macro returns the signal number of the signal that causedthe child process to stop. take screen shot for code and output in ubuntu kaliarrow_forwardQuestion on Preprocessor (Programming in C, by Kochan) Consider the definition of the printint macro:#define printint(n) printf ("%i\n", x ## n) Could this macro be used to display the values of the 100 variables x1–x100: for (i = 1; i < 100; ++i) printint (i); I've tried various definitions for the macro and none of them work. Am I right to assume there is no way to get the following loop in main() to print x1–x100 variables (ie adding x to i) using such (or any other) #define macro?arrow_forward
- It is desired to write a #define macro to compute the product of two numbers. What is the correct macro? Group of answer choices #define multiply (return(a*b)) #define multiply(a,b) (a*b) #define multiply(a,b) (int a*int b) #define multiply (int a, b; return(a*b)) ============= What does the function fopen return? Group of answer choices an integer a FILE pointer it returns nothing the contents of the file it is opening =============== Consider the following code fragment: int main (int argc, char* argv[]) { cout<<argc; return 0; } The code is compiled and executed from the terminal as: .\a.out What will be the output? Group of answer choices 0 1 argc -1arrow_forwardComputer Science Write a VBA program that replaces all instances of Oklahoma State University in provided text with the words Rose State College. NOTE: some students have had issues sending Word files with macros, so please include a screenshot of the macroarrow_forwardWhich directive stops all further expansion of a macro?arrow_forward
- Discuss the concept of mouse macros and how they can be created and utilized for complex tasks in Windows. Provide an example of a practical application.arrow_forwardTopic: Concepts of programming Language Kindly provide a bit detailed answer 4. a) Consider the following program, written in JavaScript-like syntax:// main programvar x, y, z;function sub1() {var a, x, z;. . . }function sub2() {var a, b, y;. . .}function sub3() {var a, y, w;. . .}Given the following calling sequences and assuming that dynamic scoping isused, what variables are visible during execution of the last subprogramactivated? Include with each visible variable the name of the unit where it isdeclared.“main calls sub1; sub1 calls sub3; sub3 calls sub2.”arrow_forwardWrite a MACRO that performs CHECKSUM test of a given data. It takes two parameters, DATABYTES array and its LENGTH. For example, LENGTH is 5 and DATABYTES is 25h, 62h, 3Fh, 52h, E8h the last byte (E8h) is CHECKSUM byte. Your macro will move 01h to DX if the checksum test passes, otherwise DX is reset (00h) CHECKSUMTEST MACRO DATABYTES, LENGTH .... ENDMarrow_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