List of Data Types of C And C++ Language

C DATA TYPES IMAGE

DATA TYPES:
  • Data types indicate what type of value you can store in a variable.
  • Data type may be Numeric or Non Numeric in Nature. 
TYPES OF DATA TYPE:
In C data types are divided into 3 categories:
  1. User define data types
  2. Built-in data types
  3. Derived data types
BUILT-IN DATA TYPES:
Built-in data types are basic or primitive data types. There are 4 built-in data types in C
  1. Int
  2. Float
  3. Char
  4. Double
Brief Explanation:



Int:
  • This is a keyword used to indicate an Integer number. 
  • Integer is a sequence of digits without decimal point. 
  • The range of int depend upon the word length of the computer. 
  • %d format specifier is used.
NOTE:If your computer is an 8 bit computer then range of int is
-2^(8-1) < integer number < +[2^(8-1)] -1
-128    < integer number < +127


Float:
  • This is a keyword used to indicate a floating point number. 
  • The floating point number is a sequence of digits with decimal point that is real number. 
  • These numbers may be expressed either in decimal form or scientific notation.
  • %f format specifier is used 
NOTE:Scientific Notation is also called Mantissa-exponent notation.

data type sizes

Char:
  • This is a keyword used to indicate the character type data. 
  • The data may be string or character constant. 
  • Character constant May be defined as any single character enclosed with in a pair of apostrophes. Ex: 'a'.
  • Each character constant associated with an integer value.
  • String constant may be defined as a combination of characters placed between double quotes.  Ex: "shubham".
  • The string constant is terminated by null character.
  • %c format specifier is used 

Double:
  • This is a keyword used to indicate a double precision floating point number. 
  • It is used whenever more accuracy is required in representing the floating point number. 
  • It is same as that of float but the number of digits after decimal point is double than that of the float.
  • Float stores maximum of 6 digits after decimal point. But double stores 16 digits after decimal point.


BLACKSLASH CONSTANTS:
It is also called escape sequences. It consist of two characters in which first character is always backslash(\) and second character can be one of the characters a, f, n, r, t, u, ', ", \ and 0. It is used in output statements.


 Backslash Constant
              \n                   
              \t
              \v
              \0
              \b
              \a
              \f 
           Meaning
          New Line
          Horizontal Tab           
          Vertical Tab
          Null Character
          Back Space
          System alarm
          Form Feed 

Void:
  • Only a single Non specified data type.
  • It does not Specify anything.


0 Response to "List of Data Types of C And C++ Language"

Post a Comment

Popular Posts

Label

1 Sidebar 2 Columns 3 Columns Footer 3rdball 4 Columns Footer Alex Alvaro Antsasia Arlinadesign Averie Barry BASIC CONCEPTS Basil Bayna Fast BeautyPress BeautyTemplates Beckel Best Best - Clean Beyonce Pro BioMag BlackMag Blanter Nova Blogger Card Bloggertheme9 Blogish Bpress Brakt C LANGUAGE C PROGRAMS C++ LANGUAGE C++ PROGRAMS Carella Cellar Charlotte Chooko Lite Clara Clean Combo One Cooperate Crusade Darry Dorman Dreamway Dunia Blanter eCars EduAcademy EducationPress Elise Elvan Eva Everyday FabNews Fashion Fashion Blogger Template Fashion Gossip FastCars Fedo FlashNews Fredy Portfolio Gaming Globus GoodTime Goomsite HTML LANGUAGE iGaming Indicate Innove Insomnia InspiredNews iSoft Jasmine Kalem Landscaping Lashira Lavelle Lily Fashion Limax Linea Lionex Luminescence Lite Lumix Luxury Magazine MagazinePro MAJOR DIFFERENCES MarketingBlog Martin MaxiMag Medica Mega Melissa Mercury MeshMag Minimag Minimalist MiniNews MovieKhor msdesignbd MusicLand Neko NetZine New Spread News16 Newsflash NewsForce NewsIdea Newspaper News NewsPro Nubie Fast Odd Themes Optima PaperMag PaperMag blog Parhlo Perfection Personal Personal Blog Photosout PixelZ Power Blog Premium Themes ProfileMag Purez Rano ReadNews Real estate Remito Grid Responsive Revo Robusta Rotario Saara SeoBoost Settle Shouters Simple Catch SimpleClean Sketchly SNews SolidMag Someo Sophie Sora Sora Bank Sora Home Sora News Responsive Sora One Sora Ribbon Spido Sticko Stucco Sure Mag Swift Tech Tech Pro Techia Techmax TechSpot TemplateClue Templateism Templatesilk Templatesyard Templatezy The Freelancer TheBlogger TheFocus Themeforest Themexpose TIPS AND TRICKS Topside TravelMag Trendy Trendy Travel Tumblr Under Construction Uong Jowo Veethemes Vertox VideoPlay Vigo Waverly way2themes WebBiz Wedding X-Mag Zealer ZetaMag