SlideShare a Scribd company logo
4
Most read
5
Most read
6
Most read
NAME: RAHUL SAMANTA
DEPARTMENT: ELECTRICAL
ENGINEERING
SEMESTER: 2nd
YEAR: 1st
SUBJECT: COMPUTER
SCIENCE
(CS-201)
TOPIC: FLOATING
POINT
CONSTANT
FLOATING POINT
CONSTANT IN C
LANGUAGE
IT IS A PART OF NUMERIC CONSTANT. IT IS ALSO KNOWN AS REAL
CONSTANT.
CONSTANTS
INTEGER
FLOATING POINT
CHARACTER
STRING
DESCRIPTION OF FLOATINT
POINT CONSTANT
 A "floating-point constant" is a decimal number
that represents a signed real number. The
representation of a signed real number includes an
integer portion, a fractional portion, and an
exponent. We use floating-point constants to
represent floating-point values that cannot be
changed.
A floating-point constant consists of:
•Decimal integer
•Decimal point
•Decimal fraction
•e or E and a signed integer exponent (optional)
•Type suffix: f or F or l or L (optional)
NOTE
Either decimal integer or decimal fraction (but not both) can be omitted. Either decimal point
or letter e (or E) with a signed integer exponent (but not both) can be omitted. These rules
allow conventional and scientific (exponent) notations.
Negative floating constants are taken as positive constants with an unary operator minus (-)
prefixed.
TYPES
There is total three types
float
no suffix defines
double
f F defines
long double
l L defines
SYNTAX
 floating-point-constant:
fractional-constant exponent-part floating-suffix
digit-sequence exponent-part floating-suffix
 fractional-constant:
digit-sequence . digit-sequence
digit-sequence .
 exponent-part:
e sign digit-sequence
E sign digit-sequence
 sign: one of
+ -
 digit-sequence:
digit
digit-sequence digit
 floating-suffix: one of
f l F L
EXANPLE PROGRAM
1
2
3
4
5
6
7
8
9
1
0
#include<stdio.h>
#include<conio.h>
int main()
{
const float a = 2E-4;
clrscr();
printf(“Value of a =%e”,a);
getch();
return 0;
}
Output
Value of a = 2.000000e-04
THANK YOU

More Related Content

PPTX
Character set of c
PDF
10. switch case
PPTX
Switch Case in C Programming
PPTX
C Tokens
PPTX
Expression and Operartor In C Programming
PPT
PPTX
Data Type in C Programming
PDF
STRUCTURE AND UNION IN C MRS.SOWMYA JYOTHI.pdf
Character set of c
10. switch case
Switch Case in C Programming
C Tokens
Expression and Operartor In C Programming
Data Type in C Programming
STRUCTURE AND UNION IN C MRS.SOWMYA JYOTHI.pdf

What's hot (20)

PPTX
Data Types In C
PPT
Strings
PPT
C operator and expression
PPT
structure and union
PPT
Graph theory presentation
ODP
Function
PPTX
6-Role of Parser, Construction of Parse Tree and Elimination of Ambiguity-06-...
PPTX
What are variables and keywords in c++
PPTX
OOPS In JAVA.pptx
PPTX
Array and string
PPTX
Structures and Unions
PPTX
Python for loop
PPTX
3. Syntax Analyzer.pptx
PPT
1.python interpreter and interactive mode
PDF
module5_backtrackingnbranchnbound_2022.pdf
PPTX
Moore Mealy Machine Conversion
PPTX
Data types
PPT
Introduction to c programming
Data Types In C
Strings
C operator and expression
structure and union
Graph theory presentation
Function
6-Role of Parser, Construction of Parse Tree and Elimination of Ambiguity-06-...
What are variables and keywords in c++
OOPS In JAVA.pptx
Array and string
Structures and Unions
Python for loop
3. Syntax Analyzer.pptx
1.python interpreter and interactive mode
module5_backtrackingnbranchnbound_2022.pdf
Moore Mealy Machine Conversion
Data types
Introduction to c programming
Ad

Similar to floating point constant in c (20)

PPTX
RAVI PAL.pptx
PPTX
Floating point representation and arithmetic
PPT
Single Precision Floating Point Format.ppt
PPTX
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
PPTX
Implementation of character translation integer and floating point values
PPT
L12-FloatingPoint.ppt
PDF
IEEE Floating Point
PPTX
Aviraj --floating point representation and arithmetic.pptx
PDF
IRJET- Implementation of Floating Point FFT Processor with Single Precision f...
PPTX
Only floating point lecture 7 (1)
PPT
Lec 02 data representation part 2
PPT
number system: Floating Point representation.ppt
PPTX
Number formats for signals and coefficients in DSP system
PPT
11Introduction_Floating_Point_Arithmetic.ppt
PPTX
Unit 2 Arithmetic
PDF
Survey On Two-Term Dot Product Of Multiplier Using Floating Point
PDF
DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...
PPTX
Data Representation - Floating Point
PPT
digital logic circuits, digital component floting and fixed point
PPTX
datareprersentation 1.pptx
RAVI PAL.pptx
Floating point representation and arithmetic
Single Precision Floating Point Format.ppt
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
Implementation of character translation integer and floating point values
L12-FloatingPoint.ppt
IEEE Floating Point
Aviraj --floating point representation and arithmetic.pptx
IRJET- Implementation of Floating Point FFT Processor with Single Precision f...
Only floating point lecture 7 (1)
Lec 02 data representation part 2
number system: Floating Point representation.ppt
Number formats for signals and coefficients in DSP system
11Introduction_Floating_Point_Arithmetic.ppt
Unit 2 Arithmetic
Survey On Two-Term Dot Product Of Multiplier Using Floating Point
DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...
Data Representation - Floating Point
digital logic circuits, digital component floting and fixed point
datareprersentation 1.pptx
Ad

Recently uploaded (20)

PDF
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Salesforce Agentforce AI Implementation.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Nekopoi APK 2025 free lastest update
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
Odoo Companies in India – Driving Business Transformation.pdf
Complete Guide to Website Development in Malaysia for SMEs
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Wondershare Filmora 15 Crack With Activation Key [2025
Design an Analysis of Algorithms I-SECS-1021-03
Salesforce Agentforce AI Implementation.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
Why Generative AI is the Future of Content, Code & Creativity?
Nekopoi APK 2025 free lastest update
Patient Appointment Booking in Odoo with online payment
Design an Analysis of Algorithms II-SECS-1021-03
Designing Intelligence for the Shop Floor.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Internet Downloader Manager (IDM) Crack 6.42 Build 41
CHAPTER 2 - PM Management and IT Context
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf

floating point constant in c

  • 1. NAME: RAHUL SAMANTA DEPARTMENT: ELECTRICAL ENGINEERING SEMESTER: 2nd YEAR: 1st SUBJECT: COMPUTER SCIENCE (CS-201) TOPIC: FLOATING POINT CONSTANT
  • 2. FLOATING POINT CONSTANT IN C LANGUAGE IT IS A PART OF NUMERIC CONSTANT. IT IS ALSO KNOWN AS REAL CONSTANT.
  • 4. DESCRIPTION OF FLOATINT POINT CONSTANT  A "floating-point constant" is a decimal number that represents a signed real number. The representation of a signed real number includes an integer portion, a fractional portion, and an exponent. We use floating-point constants to represent floating-point values that cannot be changed.
  • 5. A floating-point constant consists of: •Decimal integer •Decimal point •Decimal fraction •e or E and a signed integer exponent (optional) •Type suffix: f or F or l or L (optional) NOTE Either decimal integer or decimal fraction (but not both) can be omitted. Either decimal point or letter e (or E) with a signed integer exponent (but not both) can be omitted. These rules allow conventional and scientific (exponent) notations. Negative floating constants are taken as positive constants with an unary operator minus (-) prefixed.
  • 6. TYPES There is total three types float no suffix defines double f F defines long double l L defines
  • 7. SYNTAX  floating-point-constant: fractional-constant exponent-part floating-suffix digit-sequence exponent-part floating-suffix  fractional-constant: digit-sequence . digit-sequence digit-sequence .  exponent-part: e sign digit-sequence E sign digit-sequence  sign: one of + -  digit-sequence: digit digit-sequence digit  floating-suffix: one of f l F L
  • 8. EXANPLE PROGRAM 1 2 3 4 5 6 7 8 9 1 0 #include<stdio.h> #include<conio.h> int main() { const float a = 2E-4; clrscr(); printf(“Value of a =%e”,a); getch(); return 0; } Output Value of a = 2.000000e-04