Computer Science, asked by roykrishna372, 6 months ago

1. Constant variables can be created in CPP by using
(1 Point)
const
define​

Answers

Answered by Jai0917
0
In C language and C++ we use the keyword const to make program elements constant. const keyword can be used in many contexts in a C++ program.
...
It can be used with:
Variables.
Pointers.
Function arguments and return types.
Class Data members.
Class Member functions.
Objects.
Answered by syed2020ashaels
0
  • In C language and C++ we use the keyword const to make program elements constant.const keyword can be used in many contexts in a C++ program.
  • The constant variable can be initialised once only.
  • The default value of constant variables are zero.
  • In c++ the const keyword is something that doesn't change.
  • The const member functions are the functions which are declared as constants in the program.
  • The object called by these functions cannot be modified.
  • A  const member function can be called by any type of object.
  • Hence the constant variables can be created in CPP by using const.

#spj2

Similar questions