What is constant keyword in C++? Illustrate its various uses.
Answer / Rajesh Kumar Gupta
The const keyword in C++ can be used to declare a variable, function, or pointer as read-only. Const variables must be initialized at the point of declaration and cannot be modified thereafter. Const functions cannot modify any non-const object or variable within their scope.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain the difference between method overriding and method overloading in C++?
How to convert integer to string in C++
In C++ what is the meaning of data hiding?
What are string library functions(syntax).
What is an abstract class in C++
1 Answers SwanSoft Technologies,
If class D is derived from a base class B
How does stack look in function calls? Write a recursive function call, how will the stack look like?
What Is A Default Constructor in C++ ?
Write a program to read the values a, b and c and display x, where x=a/b–c. Test the program for the following values: (a) a = 250, b = 85, c = 25 (b) a = 300, b = 70, c = 70
Identify the error in the following program. include<iostream> using namespace std; void main() { int num[]={1,2,3,4,5,6}; num[1]==[1]num ? cout<<"Success" : cout<<"Error"; }
What is placement new?
Tell How To Check Whether A Linked List Is Circular ?