Write a c++ program to create an unchangeable variable with the coast keyboard
Answers
Answered by
16
Answer:
#include<iostream.h>
#include<conio.h>
void main()
clrscr();
{ //To create an unchangeable variable using const keyword, here the initialization of a value to the variable is necessary during declaration because it remains a constant throughout the program further.
const int m = 5;
//The datatype could have been anything with the appropriate keyword and syntax
cout<<m;
getch();
}
Hope this helps you !
Similar questions
Math,
4 months ago
Math,
4 months ago
Computer Science,
9 months ago
Math,
9 months ago
Geography,
1 year ago