Beruflich Dokumente
Kultur Dokumente
com
(http://www.c4learn.com/)
Table of Content
C 32 keywords (http://www.c4learn.com/c-programming/c-keywords/)
C variables (http://www.c4learn.com/c-programming/c-variable/)
C Constants
C Constants
C Constants
Ad closed
GST Ready Online Accounting by #1 Accounting Software
- World's
Create GST Invoices. Track Sales, Expenses and Input Tax Credit. Try for Free.
Stop seeing this ad Ads by Google
quickbooksindia.info/GST/Software
What is Constant ?
Constant in C means the content whose value does not change at the time of execution of a program.
http://www.c4learn.com/c-programming/c-constants/ 1/4
4/22/2018 C Constants - C Programming - c4learn.com
De nition :
[box]Constant means “Whose value cannot be changed“[/box]
(http://1.bp.blogspot.com/_ynkoLGkpwXY/TDVW8Pa9b1I/AAAAAAAAAjE/JT3pGEVuejQ/s1600/Constant+Variable.jpg)
Explanation :
Initially 5 is Stored in memory location and name x is given to it
After We are assigning the new value (3) to the same memory location
This would Overwrite the earlier value 5 since memory location can hold only one value at a time
The value of ‘3’,’5′ do not change ,so they are constants
In Short the ‘Values of Constant Does not Change‘.
const int a = 1;
int const a = 1;
above declaration is bit confusing but no need to worry, We can start reading these variables from right to left. i.e
Declaration Explanation
Ad closed by
Report this ad
Custom Search
*T&C Apply
Replay
http://www.c4learn.com/c-programming/c-constants/ 3/4
4/22/2018 C Constants - C Programming - c4learn.com
Ad closed by
Report this ad
Ad closed by
Report this ad
http://www.c4learn.com/c-programming/c-constants/ 4/4