Constant in C Language

C Constants

In C programming language, a constant is a value that cannot be modified during the execution of the program. Constants are often used to define fixed values that are used repeatedly throughout a program.

Here are some examples of constants in C:

Integer Constants: Integer constants are whole numbers without any decimal point or fractional part. They can be represented in decimal, octal or hexadecimal formats. Examples of integer constants in C include:

Floating Point Constants: Floating point constants are real numbers with a decimal point or an exponent. They can be represented in decimal or exponential formats. Examples of floating point constants in C include

Character Constants: Character constants are single characters enclosed in single quotes. Examples of character constants in C include:

String Constants: String constants are a sequence of characters enclosed in double quotes. Examples of string constants in C include:

Enumeration Constants: Enumeration constants are user-defined constants that represent a set of named values. Examples of enumeration constants in C include:

Note that in C, constants are usually defined using the const keyword to indicate that their values cannot be changed.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

https://atozonlinesolutions.com/wp-content/uploads/2017/03/logo_white.png
https://atozonlinesolutions.com/wp-content/uploads/2017/03/logo_white.png
About
Products
Subscribe

If you wish to receive our latest news in your email box, just subscribe to our newsletter. We won’t spam you, we promise!

    Applauz

    As the pioneer of the lean startup movement, APPLAUZ has dedicated it’s time to sharing effective business strategies that help new businesses and enterpreneurs put their money to work in the right way.

    Subscribe

    If you wish to receive our latest news in your email box, just subscribe to our newsletter. We won’t spam you, we promise!

      Applauz

      As the pioneer of the lean startup movement, APPLAUZ has dedicated it’s time to sharing effective business strategies that help new businesses and enterpreneurs put their money to work in the right way.

      Copyright by BOLD THEMES. All rights reserved.