Posts

Showing posts with the label Constant in C Programming

Constant in C Programming

Constant is an entity which never changes in the given problem or program.Types of ConstantThere are basically two types of constants in C.Scalar/ Primitive/ PrimaryCompositeThe Scalar types of constant are those which can't be divided any more and the composite constant are those which can be divided into multiple scalar constants. In this article, we only discuss the Scalar/Primitive constant.The Composite constants are discussed later.1. Integer ConstantA number without any fractional part is called Integer constant.Example: 25, 0, -44, 456 etcRules of Integer ConstantNo decimal points are allowed. Example 25 is correct but 25.0 is incorrect.Rules of Integer Constant +ve/-ve both types of values are allowed.Special, Comma and other characters are not allowed. Example 2 3 4 and 12,500 are incorrect.Valid Range: -32768 to 327672. Floating point constant or real constantCan contain decimal point +ve/-ve both types of values are allowed.Special, Comma and other characters are not a…

Popular posts from this blog

Program to calculate telephone bill

Overview of Go lang

Arrays in C Language

String in golang

Data Types in Go language

Say Hello world in Go lang

Installing go lang

Arrays in Go lang

Decision Making in Go lang

Creating your first html page