Header Ads

Constant in c language and constant definitions | constant in computer


Constant in c language and constant 

In this post you will know what is Constant.,Constant in c language and constant definitions | constant in computer,string,real,numeric and etc.
Constant in c language and constant definitions
Constant in c language and constant definitions 


Constant definitions

Constant is in refer to fixed value that do not change during the execution of the program.

There are two types of constant

Numeric constant

There are two types of numeric constant
  1. Integer constant
  2. Real constant

  Integer constant

Decimal integer constant

There are a sequence of digit from 0 to 9 without fraction part. It may be negative, positive or zero.
Examples
12,499. 0, , -15,44

Octal integer constant

There are sequence of digit from 0 to 7 without fraction part. It may be negative, positive or zero. It must include  0 before the number.
Example
04,244 ,  -0244
Read this:
  1. मोबाइल से पैसे कैसे कमाए इन हिंदी
  2. Mpl se paise Kaise kamaye | mpl से पैसे कैसे कमाये

Hexadecimal integer constant

There are sequence digit from 0 to 9 and A to F without fraction value. It may be negative, positive Or O  . It must include X.

Example
0x244, -0xA44

Real constant

There are number with fraction part. This is also non age floating point constant.
Example
12.44

Non numeric constant

There are two types of non numeric constant
  1. Character constant
  2. String constant

Character constant

There are enclosed in single quote. This constant single character or digit.
Example
‘9’ 'n'
Note:- character have integer value . known as ASCII

String constant

They are sequence of character digit aur any symbol closed double quote.
Example
“ Hello” “ &ab”

Variable

A variable is named location in memory that is used to hold value that can be modified in the program by the instructions.
Example
Int a,b
Float c, d







So in today's post you have learned what are the constants and what are the types of constants, what is the value of ASCII  you have learned all this in today's post, I hope you liked our article if you If you get help, then you must share this with your friend.

   Thanks for visiting on
    Coding knowledge.in 
 

No comments:

Powered by Blogger.