Programming in C
Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
Question
Book Icon
Chapter 3, Problem 3E
Program Plan Intro

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.

Blurred answer
Students have asked these similar questions
which of the following statements are true?
Which of the following is correct?
Which of the following is true?
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT