Pages
Assignment
Synopsis
C
Graphics
Compiler
C#
DCN
DBMS
Discrete Math
DS
IT Fun
Java
Json
NIELIT
Notes
Office
OOPS
OS
PHP
Project
Phython
Question
SSAD
Web
UGC Net
VB
ASP
Friday, 9 June 2017
Write a C program to modify the constant variable.
Q : Write a C program to modify the constant variable.
Solution :
#include<stdio.h>
void main()
{
const int a=1;
int *p;
p=&a;
printf("\n%d",a);
*p=2;
printf("\n%d",a);
}
Next Question
No comments:
Post a Comment
Newer Post
Older Post
Home
View mobile version
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment