Chap. 1 : Unit 4 : Introduction to C Language: Part 5

इंटीजर कॉंन्स्टंट बघितला. शाळेमध्ये असतांना त्याला आपण पुर्णांक म्हणायचो. enlightenedआता पुर्ण आहे म्हणजे अनेक काही अपुर्णही असतं आयुश्यातwink. मग प्रोग्रॅमिंग लॅंग्वेज कशी काय अपवाद असू शकते? त्यामध्ये सुद्धा मग डेनीसनी नवीन डेटा टाइपची रचना केली. त्याला फ्लोटींग पॉइंट कॉंस्टंट म्हणतात. बॅंक लोन चा व्याज दर फ्लोटींग असतांना अनिश्चीत असतोfrown तशीच यामधील व्हॅल्यू सुद्धा असते..त्यामूळे जरा जपूनच वागायला लागते याच्याशी.broken heart म्हणून याचे नियम माहीत असणे जास्त महत्वाचे…angry

Real constant

If we want to store real constant then we need to create a real data. It is the one which contain decimal in it. So generally we can say like

It can be a positive or negative. For example 7.98 and -34.0985 are real constants

Default sign is positive. For example 5.6 is positive

Usually it contains decimal point

It must be a digit

Real constant cannot have blank space. For example 4.5 is valid but 56 78 89.90 is invalid

It cannot contain any special character. For example 4,785 .89 is invalid number

Under DOS environment it takes 4 bytes of memory

The keyword float is reserved for real constant

It is also called as floating point constant

Real number can be written in two ways.

Decimal format

Here it contains the decimal point. If number is small, usually it is written using this format

Exponential format

If number is too large or too small then this format is used

For example in mathematics if you can recall 540 billion can be written like 5.42 x 109. In C using exponential format it can be written like 5.42e9

By default any real number has got precision up to 6 decimal places

Access this framework with lot more stuff like C language MCQ, viva and interview preparation, Glossary, Solved Programs of C language etc. please register free on Register / Login

cenglishcppengcmarathi

Leave a Reply

%d bloggers like this: