Rules for constants:
Integer constants:
The integer constants can be decimal, octal or hexadecimal constants can only have numbers (0 – 9), non-real numbers. It can also have suffix that is a combination of “L” and “U” for long and unsigned respectively.
Floating point constants:
The floating point constants have an integer, decimal, fractional and exponent values. The user can represent floating point variables either decimal or exponential form.
Character constants:
The character constants are enclosed in single quotes. It can be an escape sequence, plain character or universal character.
String constants:
The string constants are enclosed in double quotes. It contains characters that are similar to character constants ie., escape, plain and universal sequence. The user can break the long line into many lines using string constants and separating them using blank spaces.
Want to see the full answer?
Check out a sample textbook solution- Rewrite the following statement formally. Use variables and include both quantifiers ∀ and ∃ in your answer. Every even integer greater than 2 can be written as a sum of two prime numbers.arrow_forwardMark the these with true or false and correct the false And thank you ?arrow_forwardAnswer all of the following with True or False.arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT