C++ How to Program (10th Edition)
C++ How to Program (10th Edition)
10th Edition
ISBN: 9780134448237
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
Question
Book Icon
Chapter E, Problem E.12E
Program Plan Intro

#define SQR(x) x* x:

when preprocessor expands this macros it will produce the square of the suppiled number correctely and will not give any error.

#define SQR(x) (x*x):

when preprocessor expands this macros it will produce the square of the suppiled number correctely and will not give any error.

Blurred answer
Students have asked these similar questions
In C-programming   Execute the following operation for the 2D matrix input M.  Print the matrix M on the screen in matrix format Display the transpose of the matrix M Find the max of each column of matrix M and write to a file  Input From the keyboard, user will enter: The matrix size.the elements of the matrix.Choice of which process to execute. Output Program will show : Matrix size .Choice of process :1. Display the matrix2. Display the matrix and its transpose3. Display the matrix and max values from each column and write to the file4. Exit When user choose '1' print the matrix M.When user choose '2' print the matrix M and its transpose.When user choose '3' print the matrix M and Max value for corresponding column below it.  Then print "File is successfully created!" when a file is successfully created.  If it is not successfully created it will print "File is failed to be created!".When user choose '4' terminate the program ADDITIONAL FEATURESThe program will give repetition for…
7. Translate the following function into pseudo-assembly: Void swap_nums(int a, int b){ if (a b) return a; 3 int temp = 0; temp = a; a = b; b temp;
C language for solution Note: soution this program Use Array 1. Write a program to do the following: a. Write a Cover Page function to print the HW details passing the needed parameters and has no return. b. Write a function that gets student grades and ID (maximum number of students is 20) then the function has a switch statement to enable the user to choose one of the following operation: i. Call MaxMin function to find and print the maximum and minimum grades as well as their ID ii. Call function Average to return the average grade of the class. iii. Call mark function to print students ID, their grades, and marks (as in the below table) iv. Call Sort function to sort the student ascending or descending based on their grades. The program will repeat the operation tile the user wish to terminate the program. Note: Student's grades are between 0 and 100 (use data validation technique). • You will get zero if you don't use comments and print HW details (your name, course name, course…
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Systems Architecture
    Computer Science
    ISBN:9781305080195
    Author:Stephen D. Burd
    Publisher:Cengage Learning
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning