{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Inta b s um a vg 5 5 declaration of an integer

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: th e na m e o f a va ria b le e .g . s um If we h a ve m o re th a n o ne va ria b le o f s a m e ty p e , we c a n s e p a ra te th e va ria b le na m e s with c o m m a s . int a , b , s um , a vg ; 5 5 Declaration of an integer variable can be preceded by data types like Declaration int, unsigned int, long int int, Sizes of data types are as follows Type Bytes Min Range Max Range int / signed int 2 Bytes -32,768 unsigned int 2 Bytes 0 65,535 long int 4 Bytes -2,147,483,648 2,147,483647 Format Specifier +32767 6 Types of variables Floating point variable Floating These variables are used to store floating-point numbers having These Sizes of data decimal pointtypes are as follows Real/float variable declaration statement has the form Real/float float avg; float Type Bytes Min Range Max Range float 4 Bytes -3.4 x 1038 3.4 x 1038 double 8 Bytes -1.4 x 10308 1.4 x 10308 long double 10 Bytes -1.4 x 104932 1.4 x 104932 7 Types of variables character variables Character variables are used to store character con...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online