If we want that the value of a variable is fixed & shold not be changed even accidentally, then such a variable is defined as const
#include<stdio.h>
void main()
{
const int a=512;
printf("%d",a);
}
OUTPUT:
512
#include<stdio.h>
void main()
{
const int a=512;
printf("%d",a);
}
OUTPUT:
512
No comments:
Post a Comment