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
Concept explainers
Expert Solution & Answer
Chapter 2, Problem 17PS
Explanation of Solution
Given: The following constants, such as 15, -14.24, ‘b’, “1�, and “16�.
To find: The type of the following constants, which are 15, -14.24, ‘b’, “1�, and “16�.
Solution:
The type of the following constants are:
15 – Integer constant. These are the ones which should have at least one digit, either positive or negative without a decimal point. They lie within the range of -32768 to 32767.
-14.24 – Integer constant. These are the ones which should have at least one digit, either positive or negative without a decimal point...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Q2: Which of the following statements are equivalent? Which ones are correctly indented?
What is the output of the statements below?
x=3
while x
Which of these statements are true? a. Any expression can be used as a statement. b. The expression x++ can be used as a statement. c. The statement x = x + 5 is also an expression. d. The statement x = y = x = 0 is illegal.
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
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- What is the output of the following statements? b. cout << "y != z - 9: " << (y != z - 9) << endl;c. cout<<"x-y==z+10:"<<(x-y==z+10)<<endl;d. cout << "!(z < w): " << !(z < w) << endl;arrow_forwardWhich of the following takes up more memory?a. int b. short c. byte D. doublearrow_forwardWhich of the following is not a correct variable type? (a) Float (b) Real (c) Int (d) Double (e) Char.arrow_forward
- 12. Find the value of variable z after the execution of the statements given below. int z = 4; z = z<<4:arrow_forward20.If A, B, and C are Boolean variables, which of the following statements are correct?a) A ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C)b) A ∨ (B ∧ C) = (A ∨ B) ∧ (A ∨ C)c) (A ∧ B) ∨ C = C ∨ (B ∧ A)arrow_forwardWhich of the following statements below is self-contradiction? a. [(X→Y) ∧ X]→Yb. [(~X→Y) ∧ (~X ∧ ~Y)]→Yc. X → (X ∨ Y)d. X ∧ (~X ∧ Y) 28arrow_forward
- Which of the following statements is correct? To raise the value of a variable, use increment; to reduce the value of a variable, use decrement. The word "system testing" should be defined.arrow_forwardThe following statement is supposed to print the integers from 1 to 10, but it contains an error. for (i = 1; i >= 10; i++) System.out.println(i); A.) What will be printed when the statement is executed? B.) Describe the error and show how to fix it.arrow_forwardWhat is the value of the following variables after the following actions? int value1, value2, value3, value4; value1 = 9; value2 = 4; What is the value of value1 and value3: value3 = ++value1; What is the value of value2 and value4: value4 = value2++;arrow_forward
- 8. Which of the following cannot be a variable? a. __init__ b. in c. it d. onarrow_forwardWhat is the output of the following code?ch = 'a'ch2 = ch.upper()print(ch, ch2)arrow_forwardc++ make sure is not copy paste and 100% accurate 4. Write three programs for calculating area of circle one using withoutparameters and without return values, second with parameters and withoutreturn values, third with parameters and with return values.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,