Q : Write a C program to modify the constant variable.
Solution :
#include<stdio.h>
void main()
{
const int a=1;
p=&a;
printf("\n%d",a);
*p=2;
printf("\n%d",a);
}
A programmer and Founder of Girfa
IT Services, working from 2009.At Starting computer teaching was my full-time job but after 10 years of teaching I chose to programming as a full-time job and teaching become part-time. In real life, I am very lazy and I made it my coding style I always try to make a reusable component that’s my USP for programming which saves my time and extra working both.
No comments:
Post a Comment