constants
//first way of defining constant
/*#include <stdio.h>
int main()
{
const int a=6; // here we defined 'a' as constant
//a=10; (here we can not change variable 'a' because we defined it as constant)
printf("%d",a);
return 0;
}*/
//second way of defining constant
#include <stdio.h>
#define a 10 // here we defined 'a' as constant
int main()
{
printf("%d",a);
return 0;
}
Comments
Post a Comment