Computer Science: A Structured Programming Approach Using C, Third Edition
3rd Edition
ISBN: 9780534491321
Author: Behrouz A. Forouzan, Richard F. Gilberg
Publisher: Course Technology, Inc.
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 2, Problem 6PS
Explanation of Solution
Given: Identifiers.
To find:Â The identifier(s) that is/are not valid.
Solution:
Option (a) is valid as it starts with an underscore and is a combination of alphabets.
Option (b) is valid as it is simply a combination of alphabets and it starts with an alphabet.
‘sales_amount’ is correct as it starts with an alphabet and is a combination of alphabets and underscore. So, option (c) is valid.
‘salesAmount’ is correct as it starts with an alphabet and is a blend of alphabets...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Which of the following statements for Tax_rate holds the value to 0.075?
a. double tax_rate = 0.076;
b. const Tax_Rate;
c. const double Tax_rate;
d. double Tax_Rate = 0.075;
Validy options is: Valid / Invalid
Which of the given statement satisfies this condition:
Calculate the remainder after the variable product is divided by divisor and assign the result to product.
a. product % divisor == 0;b.product =% divisor:c. None of the aboved. product%= divisor:
Chapter 2 Solutions
Computer Science: A Structured Programming Approach Using C, Third Edition
Ch. 2 - The purpose of a header file, such as stdio.h, is...Ch. 2 - Prob. 2PSCh. 2 - The C standard function that receives data from...Ch. 2 - Which of the following statements about the...Ch. 2 - Which of the following statements about block...Ch. 2 - Prob. 6PSCh. 2 - Which of the following is not a data type?...Ch. 2 - The code that establishes the original value for a...Ch. 2 - Prob. 9PSCh. 2 - Prob. 10PS
Ch. 2 - To print data left justified, you would use a in...Ch. 2 - Prob. 12PSCh. 2 - One of the most common errors for new programmers...Ch. 2 - Which of the following is not a character constant...Ch. 2 - Which of the following is not an integer constant...Ch. 2 - Which of the following is not a floating-point...Ch. 2 - Prob. 17PSCh. 2 - Which of the following is not a valid identifier...Ch. 2 - What is the type of each of the following...Ch. 2 - What is the type of each of the following...Ch. 2 - Which of the following identifiers are valid and...Ch. 2 - Which of the following identifiers are valid and...Ch. 2 - What is output from the following program...Ch. 2 - Prob. 24PSCh. 2 - Find any errors in the following program....Ch. 2 - Find any errors in the following program....Ch. 2 - Prob. 27PSCh. 2 - Prob. 28PSCh. 2 - Prob. 29PSCh. 2 - Code the variable declarations for each of the...Ch. 2 - Code the variable declarations for each of the...Ch. 2 - Write a statement to print the following line....Ch. 2 - Write a program that uses four print statements to...Ch. 2 - Write a program that uses four print statements to...Ch. 2 - Write a program that uses defined constants for...Ch. 2 - Prob. 36PSCh. 2 - Prob. 37PSCh. 2 - Write a program that prompts the user to enter an...Ch. 2 - Write a C program using printf statements to print...Ch. 2 - Write a program that reads a character, an...Ch. 2 - Write a program that prompts the user to enter...Ch. 2 - Write a program that reads 10 integers and prints...Ch. 2 - Write a program that reads nine integers and...
Knowledge Booster
Similar questions
- Which of the following statements is equivalent to the statement dblTotal = dblRate dblTotal? a. dblTotal = dblRate b. dblTotal = dblRate c. dblRate = dblTotal d. dblRate = dblTotalarrow_forwardYou declare a named constant with which keyword? 1. Constant 2. Const 3. NamedConstant 4. Dimarrow_forwardWhich of the following statements is equivalent to the statement dblTotal = dblTotal + dblSales? a. dblTotal += dblSales b. dblSales += dblTotal c. dblTotal =+ dblSales d. dblSales =+ dblTotalarrow_forward
- Which of the following statements is equivalent to the statement dblTotal = dblRate * dblTotal? a. dblTotal =* dblRate b. dblTotal *= dblRate c. dblRate *= dblTotal d. dblRate =* dblTotalarrow_forwardWrite the statement to declare the intMAXIMUM named constant whose value is 100.arrow_forwardWhich of the following is a relational operator? a = b == c ! d &&arrow_forward
- Which of the following identifier/variable name is considered as valid? Select one: a. First name b. M.I C. all of the choices d. Last_name The variable name name[10] is considered as valid. Select one: True False The variable name prices is considered as valid. Select one: True Falsearrow_forwardWhich of the following is NOT TRUE about subqueries? a. You can use subqueries in DML statements. b. You must place the subqueries on the right side of the comparison condition. c. Subqueries must be enclosed in parenthesis. d. There is only one type of subquery.arrow_forwardThe Excel function =sin(A1) will calculate the sine of the value in cell A1. The value in cell A1 must be in degrees. Group of answer choices True Falsearrow_forward
- Which of the following is a legal identifier? a. 1st b. legal1 c. legalidentifier! d. Legal Identifierarrow_forward1. Declare the required variables, then ask user to enter employee’s full name, id and monthly salary from keyboard, then display the values like this: Employee's name is James Cook, employee's id is 34256, and employee's monthly salary is $4533.5arrow_forwardWhen a student wants to rent a laptop, the staff member will enter the day and month on which the transaction is taking place e.g., if the customer rents a laptop on the 5th of September, the staff member will enter a ‘5’ and ‘9’. The application will then check that the day of the transaction is within the first two weeks (between and including the 1st and 14th ) of the month and calculate on what day of the month the laptop should be returned. The following checks must be made: If the day of the start of the transaction is greater than 14 or the month is not valid (1 to 12), the application will ask the staff member to re-enter the transaction date. If the starting day of the transaction is between 1 and 14 and the month is valid ( 1 to 12) the application can continue. Use a case statement to determine the month name from the month number and display the return date e.g., if the customer rented the laptop on the 5 th of the 9 th month, the return date should be…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT