Basic Concepts of C Language


CHARACTER SET:
Every programming language has its own set of characters. The characters used in C are divided into 3 categories
  1. Digits
  2. Alphabets
  3. Special characters.
TABLE SHOWS DIFFERENT ALPHABETS , DIGITS , SPECIAL SYMBOLS USED IN C LANGUAGE:


  • ALPHABETS    
  • UPPERCASE                   
  • LOWERCASE                                       
  • A-Z                            
  • a-z                  

  • DIGITS                  
  • 0-9    

  • SPECIAL                CHARACTERS                                                         
  • , COMMA
  • . PERIOD
  • : COLON
  • ; SEMICOLON
  • 'APOSTROPHE            
  • + PLUS SIGN
  • - MINUS SIGN            
  • *ASTERISK                     
  • / SLASH
  • % PERCENTAGE         SIGN
  •   & AMPERSAND
  • ^ CARAT
  • ~ TILDE
  • [ LEFT BRACKET
  • ] RIGHT BRACKET
  • { LEFT                         BRACES                                                 
  • " QUOTATION MARK
  • ? QUESTION MARK                      
  • ! EXPLAMATION   MARK                       
  • _ UNDERSCORE
  • # HASH
  • = EQUAL SIGN
  • | PIPELINE SIGN
  • < LESS THAN
  • > GREATER THAN
  • \ BACKSLASH
  • ( LEFT PARENTHESIS
  • ) RIGHT PARENTHESIS
  • } RIGHT BRACES                                          




C TOKENS:
The individual units C program are known as C tokens. We use 6 types of tokens in any C program
  1. Identifier
  2. Strings
  3. Constants
  4. Keywords
  5. Special symbols
  6. Operators
KEYWORDS AND IDENTIFIERS:
In C program every word is either a identifier or a keyword. There are 32 keywords used in C Language supported by ANSI. Keywords are the reserve words which have one or more fixed meanings and the meaning of all keywords in any circumstances cannot be changed that is why these are reserve words. All the keywords of C Language are written in Lowercase letter because In C Language uppercase and lowercase letters are significant that is different meanings. List of keywords are:


                      TABLE SHOWS DIFFERENT KEYWORDS USED IN C LANGUAGE: 


  • break
  • default
  • extern
  • int                  
  • signed
  • typedef
  • while
  • goto
  • auto
  • continue
  • enum
  • if
  • short          
  • switch
  • volatile
  • void
  • case
  • do
  • float
  • long          
  • sizeof
  • union
  • char
  • double
  • for
  • register
  • static
  • unsigned
  • const           
  • else
  • return
  • struct

IDENTIFIERS: 
Identifiers may be defined as variable name, array name , function name, class name etc.Basically identifiers are the sequence of alphabets and digits.

RULE FOR FORMING IDENTIFIER NAME:
  •  Keywords should not allow to be used as identifier.
  •  Uppercase and lowercase identifiers are different.
  •  The first character must be an alphabet or an underscore.
  •  Two successive underscores are not allowed.
  •  No special characters except underscore "_" are allowed.
  •  All succeeding characters must be either letters or digits.
EXAMPLES:
  •  int a2            VALID
  • int _a23         VALID
  • int a_257       VALID
  • float abc        VALID
  • int a__2         INVALID
  • int 2_b           INVALID
  • int char           INVALID
  • int name         VALID
  • float while      INVALID
  • float !a           INVALID

0 Response to "Basic Concepts of 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