Skip to main content

Constants ,Variable and Keywords in C Programming ( RunC - 1 )

Constants ,Variable and Keywords

In any programming language we need to follow some fundamaental rules which makes program easy to understand the developer or different developers who are working in that project.

Today we are into basic funda of C programming

1. Constants

Constants are three types Integer Constants (10,20,30,40) , Real Constants (10.2,20.3,30.4) and Character Constants ('a','b','1','2')

2. Variables : 

A variable is an entity that does change.

Variable : the value can be changed during program execution.

Take an example we are placing an object either book or fruit somewhere on table or bowl.
then it occupies some space that space is nothing but Memory in programming terminology.

That memory may vary depending on the Object so it can occupy total table or bowl. 
So basic point it we can increase or decrease the object but it should be less than the bowl or table.
[next]
Variable can store upto some maximum numbers or characters depending on the type of the variable.

Every variable will have some memory (collection of memory cells). and every memory will have a memory address to access during run time or execution time.

X (123456) 50

Here 

X is variable name given to the memory location
123456 is memory location
50 is the value in memory location 123456 which is refered by a variable "X".

We have different types of variables like Integers, Floating Point and Character constant.

Integer will store only integer values without decimal part
Floating point will store values with decimal points
Character constants stores set of character values

Keywords :

Every language will have one type of meaning.

eg : int , float, if, char are different types of predefined keywords.


Integer : 
which is defined by using keyword "int" 
Eg: int a;
    int salary;

Floating Point :

which is defined by using keyword "float"

Eg : 
float x;
float StudentPercentage;

Character :

which is defined by using char keyword

Eg: 
char ch;
char name;

Note : you cannot declare varable with name as int, float,if,char it throws an error. 


Comments

Popular posts from this blog

Microsoft Revealed the secret for Windows 10 supported devices

We know Microsoft announced new OS for Desktops, Laptops and tablets on JULY 29th 2015. Now it's time for Windows 10 Mobile. Currently users are giving their feedback by using Windows Insider preview new way of testing the Windows Phone Mobile OS. Specs for Windows 10 If you want to get the new version of windows in your mobile. It must have atleast 8GB of internal ROM. Yes it is 8GB previously Microsoft said they can run Windows 10 on 4GB ROM devices but it is not happening for may be future will have answer for that. Windows 10 can be run on 512 MB RAM or above . Get your Lumia ready In order to upgrade to Windows 10, your Lumia device will need to have the Lumia Denim software update installed. Lumia Denim is the latest build from Microsoft it's under two variants Denim Update 1 and Update it may varies depending on your carrier. Which Lumia do you have? While we're working hard to make Windows 10 available for other Lumia devices, the following is a  First list of Lumia...

Suported Windows Devices to Run Andrpod Apps on Windows Phone

Windows users got some new features in hands now. from Windows 10240 build they can able to run Android apps on Windows phones without modification to the original app code. Microsoft new build break all the pros and cons of Windows Mobile OS. Supported Devices for Now :) Nokia Lumia 920 Nokia Lumia 925 Nokia Lumia 929 (icon) Nokia Lumia 830 Nokia Lumia 930 Nokia Lumia 1520 Nokia Lumia 635 (1GB RAM variant) Nokia Lumia 730 Nokia Lumia 820 Nokia Lumia 435 Nokia Lumia 928 We hope mobiles with 1GB ram can able to Android apps flawlessly or with some constrains. Here is the list of Androids apps you can run on your Lumia Device. Top 60 Android apps you can run on your Lumia Device. 500px Antutu AirBnB AliExpress Allthecooks Amazon Kindle AndroIRC ANZ Bank GoMoney app ANZ Grow Arcane Legends Asus Browser Bank of America app Beetalk Bleacher report Bindle Buzzfeed Candy Crush Soda Saga Capital One Citi Mobile Clash of Clans Cox Connect CPUz Destiny Companion App Digg Dolphin Browser Discover...

Connect your Gmail world with your Facebook world

Hello Everyone... Another lovely post for you "Connect your Gmail world with your Facebook world" How can you send Messages between Facebook and Gmail ? Most of the people busy in this world with Facebook and Gtalk. If your friend using Facebook and you are using Gtalk then you cannot send messages directly but we found A simple trick for those who are want to chat between Facebook and Gtalk. What you  need just your friend Facebook username.  You have a doubt only facebook username is enough ? yeah its true... How ? Every domain in this world have a mail domain attached to it. What is domain ?  Eg : Facebook.com is a domain which is owned by Mark and which is expired on March 30 2020.  What you need An email Id... okay ? Finally we got  One email Id from Google and Facebook Username of your friend. This chat is two way communication between Google and Facebook... You can use any email to chat between these domains... Follow these simple steps .... Step 1 : ...