- A)
Data types:
The variables use data-type during their declaration.
- The data-type is used to determine the size of memory allocated. Here, the compiler allots the memory.
- All data-type needs different size of memory.
Some of the data-types are:
- Integer
- Boolean
- Character
- Double
- Floating point
From the table 2-6:
Variable to hold numbers in the range from 32 to 6,000
From the table 2-6, “short” or “unsigned short” data-type hold numbers in the range from 32 to 6,000.
- B)
Data types:
The variables use data-type during their declaration.
- The data-type is used to determine the size of memory allocated. Here, the compiler allots the memory.
- All data-type needs different size of memory.
Some of the data-types are:
- Integer
- Boolean
- Character
- Double
- Floating point
From the table 2-6:
Variable to hold numbers in the range from 240,000 to 140,000
From the table 2-6, “int” data-type hold numbers in the range from 240,000 to 140,000.
- C)
Data types:
The variables use data-type during their declaration.
- The data-type is used to determine the size of memory allocated. Here, the compiler allots the memory.
- All data-type needs different size of memory.
Some of the data-types are:
- Integer
- Boolean
- Character
- Double
- Floating point
From the table 2-6:
Literal which uses more memory
From the given literal “20” and “20L”; both the literals uses same amount of memory because both the “int” and “long int” data-types size are 4 bytes.
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Starting Out with C++ from Control Structures to Objects (9th Edition)
- A function named validGPA() to validate the GPA. A valid GPA value must be between 0 and 4 inclusive. The function must return the value of GPA and must take value of GPA as parameter.arrow_forwardFill in the blanks to complete the following function according to the description provided. Description of the function: The DataRequest function asks the user for the radius of a cylinder base (r) and the height of the cylinder (h). The function only fills in the 2 data. Another function will use these 2 data later. Important Instructions: If any of the spaces to be filled in should remain empty, place an X as an answer. -When you need to define the variables, use the variable name as it is used in the code of the function provided. -For reference, remember that the data types are int, double, char, bool. ********PideDatos = askfor data Entre el radio de la base del cilindro = enter the cylinder's base radius. Radio invalido = Invalid radius Entre altura = Enter height Altura invalida = invalid height******arrow_forwardVariable Root 1, Root 2 and Root 3 , Root 4 must be of data type double. It is currently of type sym. Check where the variable is assigned a value. must contain the following functions or keywords: doublearrow_forward
- Question 29 4 pts Write a Racket function, bmi, that will accept 2 parameters to calculate your body mass index: weight (in pounds) height (in inches) weight 703 height The formula is: bmi Edit Format Tablearrow_forward10. Local variables are known only in the function in which they are defined. Local variables are known only in the function in which they are defined. True O False 11. All types of functions can return more than one value. All types of functions can return more than one value. True Falsearrow_forwardYou have received the following SMS message for your "Super Boost" vaccine registration: These are your "“Super Boost" vaccine registration information: Name : Wong Choon Yee Vaccine Type : B Age : 65 Fees : 12.00 Show your information to the medical staff on duty when you have arrived at the vaccination center. Write a C program segment to prompt the user to enter the vaccine registration information. You are required to declare the necessary variables by using the appropriate data types and meaningful identifier names in your program. [Note: You should follow the rules in Camel Case Naming Convention when naming the identifiers]arrow_forward
- Write a C++ program. The program should keep an array of nine structures. Each element is for a different player on the team. When the program runs it should ask the user to enter the data for each player. The program should also calculate and display the total number of runs scored by the team. The name and number of the player with the most runs should also be displayed. Input Validation: Do not accept negative numbers for player's numbers or points scored.arrow_forwardB1. The following statements depict some requirements of Airline Reservation System. Read the following statements carefully, identify each statement that represents what specific type of requirements and fill out the table accordingly. a. The Airline Reservation System allow user to search for a flight by source airport, destination airport, date and time. b. The Flight Number consists of two parts: First two- character, which denotes airline designator and Second part contains 4 digit number, usually Eastbound and northbound flights are assigned even numbers and others odd numbers. c. The Airline Reservation System's user interface must be imp d. The Airline Reservation System shall support at least 40000 transactions per second. e. The Airline Reservation System allows the user to book flight tickets, cancel flight tickets and update journey details. nented using a Web browser. |General Requirement Operational Requirement Functional Requirement Performance Requirement Data…arrow_forwardPlease help with homework assignment! Language is C. Please answer as simply as you can. Thank you! Write two functions, main and question_1. The main function is the start of your program, and question_1 passes in a double and and a pointer of an integer. question_1 does not have a return type. In the main function, create an integer with the value of 8. Call question_1 and pass in the value 5.75 as the double and the value of the integer. Afterwards print out the be value of the integer. In the function question_1, add the double value to the integer. HINT: You will need to cast the double in order to add them together. When running this program, your end result should print out the value 13. Don't trick the program to just print 13, because there is no points assigned here, instead all the points are in the process of getting to 13.arrow_forward
- Select the statements that apply to local variables. Only statements within subroutine can view or modify local variables. Storage used by local variables is released when subroutine ends. Local variable name cannot have the same name as a local variable in another function.arrow_forwardNeeds to be done in C# language. Problem Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient, the following data should be entered: • The number of days spent in the hospital• The daily rate• Hospital medication charges• Charges for hospital services (lab tests, etc.) The program should ask for the following data if the patient was an out-patient: • Charges for hospital services (lab tests, etc.)• Hospital medication charges The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out-patient information. Both functions should return the total charges. Input Validation: Do not accept negative numbers for any data.arrow_forwardC PROGRAMMING Create a simple program that uses the name Bangladesh. That program will call a void function by passing the chosen name you have selected as a parameter, in which will print below situation: Drive away the name for something (use your creativity for the story line)arrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning