LEARN BLOGGING EASY - By Abhijit Patil
  • Home
  • About
  • Sitemap
  • Disclaimer
  • Contact
  • Trending Now! ▼
    • [T.E] Computer Engineering Syllabus
    • CRICKET PEPSI IPL 2015 Patch
    • Theory Of Computation
  • Write for Us!
Home » Learn C » learn programming language C quickly » What are variables, constants, keywords, in C language

What are variables, constants, keywords, in C language

Posted by BA
» Learn C, » learn programming language C quickly
» Sunday, August 24, 2014

 What are variables?

Ans. Variable is the name of an identifier assigned to a memory location which holds a value. Variable is an entity that may change.

 Rules for declaring a variable :

1] Variables should be declared using alphabets or underscores at the start, but not with the numbers.

eg's : variable1, variable2, a1, a_2, _variable.

Variables should not be declared in this format : eg's : 1variable, 1aa, 2_variable.

2] For using space in declaring a variable name, we can use the underscore ( _ ) sign.


 What are constants?

Ans. Constant is an entity that does not change throughtout the code. Constant is the fixed value that does'nt change.

Types of C Constants : 1] Primary constants.
                                    2] Secondary constants.

1] Primary constants : Real constants, Integer constants, Character constants.
2] Secondary constants : Pointer, Array, Enum, Union, Structure.


 Rules for declaring/constructing a constant?

An integer constant must have at least one digit.
An integer constant can be positive or negative.
An integer constant is assumed to be positive is there is no sign represented.
An integer constant does not contain decimal point.
An integer constant does not contain any commas or spaces.
examples: 323, 123, 288, -77,-921.

An real constant must have at least one digit.
An real constant should have a decimal point.
An real constant can be positive or negative.
An real constant cannot contain blanks or commas.
An real constant is assumed positive is no sign is represented.
examples: -22.12, 879.12, -83.1, 882.212.

An character constant should be a single digit value represented by inverted commas tending to the left side.
eg: 'B' 
It can contain a single special symbol  too.
It should not be contsructed as "B'


 What are keywords?

Keywords are the reserved words which has a meaning and cannot be used a variable name. keywords contain a specific meaning which is been known to the compiler. There are 32 keywords in C.

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

ADS HERE !!!

COMMENT POLICY: We’re pleased to see your comment here. However, Please Keep in mind that all comments are moderated manually by humans according to our comment policy. Using Keywords and links to your blogs or websites in the name field area is forbidden. Let’s enjoy a personal and meaningful conversation. Do not break the rules of comment policy.

Newer Post
Older Post
Home
Subscribe to: Post Comments (Atom)

Popular Posts

  • Third Year [T.E] Computer Engineering Pune University 2012 Course Syllabus
    T.E Computer (Pune University) [2012 Pattern/Course] Syllabus and Subjects : SEM-I Subjects for  semester 1  of T.E Computer engg [201...
  • Download CRICKET PEPSI IPL 2015 Patch For EA Sports Cricket 07
    EA SPORTS CRICKET 07 A2 STUDIOS IPL GAME PATCH  DOWNLOAD Today's post will be fun for 'gamers' as they will love the new IPL...
  • Theory Of Computation : Computer Engineering 5th Sem
    Theory of computation is a subject in computer science which deals with how efficiently a problem can be solved using a algorithm on a  ma...
  • The 6 Best Footer Designs For Blogger Template
    The 6 Best Footer Designs For Blogger Template Many of us are interested in designing their blogger template on their own. So, we design eve...
  • What is Bluestacks? How to use android apps On PC (Computer/Laptop)
      WHAT IS BLUESTACKS ? Bluestacks App Player For PC Bluestacks allows us to run all android applications on windows operating syste...
  • What is On-Page SEO and what are On-Page SEO Methods?
    What is On-Page SEO? 1) On-Page Seo  : It is  where you optimise elements of your site in an effort to increase your search ranking. U...
  • Write a shell program to convert all lowercase letter in a file to uppercase letter
    QUE: Write a shell program to convert all lowercase letter in a file to uppercase letter. ANS - clear         echo "Menu" ...
  • How to remove/hide author name and date-time from your blogger blog posts permanantly?
    Hi ! Today we will see the solution of one of the main problems faced by bloggers while they post on their blogs. Yes, it's the privacy...
  • Bidvertiser Advertising Adnetwork Review, Bidvertiser Payment Proof 2014
    Today, we will review an advertising network for our bloggers named 'Bidvertiser'. Don't worry if you have been banned or disab...
  • How to remove Subcribe to posts atom from blogger? Remove it permanantly from Blog
    Today, we will see that how can we design our blog and keep it clean and neat. So, many bloggers have thought of removing the 'subcribe...

CATEGORIES

  • Android
  • Big Data
  • Chrome Browser Tricks
  • Computer Engineering
  • Database Management Systems Applications
  • Download Youtube Videos
  • Hive
  • IPL 2015 EA Sports Cricket Game
  • Programming Basics
  • SEO
  • Top 10 Blogging Templates
  • Tutorials For Bloggers
  • Website Designing
  • Website Development
  • Widgets

ABOUT LBE

WHAT'S LBE?


Learn blogging easy often said (LBE) is a blog where you would be served with the finest of tech articles and other trending articles. The blog is a source of articles useful for computer engineering and other blogging topics. Started with a vision to provide good tech articles, we would do better and better day by day. Thank you all visitors for making this blog a success. We are thankful for your co-operation. Stay tuned and keep blogging :)

HEY VISITOR!

This is Abhijit Patil, an enthusiast geek blogger from Pune city (India), mostly interested in writing tech articles. Certified HTML/CSS web developer, also likes programming and tech niche. More importantly an SEO lover.

LBE QUOTE

You are what you think!

Copyright © | LEARN BLOGGING EASY - By Abhijit Patil | All rights reserved

↑