Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
C++
4.3K+ articles
C++ Programs
2.4K+ articles
C Language
2.1K+ articles
CPP Examples
714+ articles
C++ Quiz
155+ articles
CPP-Basics
101+ articles
cpp-pointer
93+ articles
misc-cpp
35+ articles
cpp-references
17+ articles
const keyword
7+ articles
C++-const keyword
11 posts
Recent Articles
Popular Articles
Type Qualifiers in C++
Last Updated: 07 June 2024
In C++, type qualifiers are keywords that modify the properties of data types, influencing how variables, pointers, or references can be used. These qualifiers enhance var...
read more
CPP-Basics
C++
C++-const keyword
C++ Programs
Picked
CPP Examples
misc-cpp
How to use const with Pointers in C++?
Last Updated: 16 May 2024
In C++, the const keyword is used as a type qualifier for defining read-only (immutable) objects that cannot be modified anywhere in their lifetime. It can be used in seve...
read more
cpp-pointer
C++
C++-const keyword
C++ Programs
Picked
CPP Examples
Const keyword in C++
Last Updated: 06 August 2024
In this article, the various functions of the const keyword which is found in C++ are discussed. Whenever const keyword is attached with any method(), variable, pointer va...
read more
Technical Scripter
CPP-Basics
C++
C++-const keyword
Const vs Regular iterators in C++ with examples
Last Updated: 18 August 2020
Prerequisite: Iterators in STLIterators are objects similar to pointers which are used to iterate over a sequence and manipulate the container elements. The advantage of u...
read more
C++
C++-const keyword
Difference Between
cpp-iterator
C++ Programs
Different ways to use Const with Reference to a Pointer in C++
Last Updated: 04 April 2020
Before moving forward with using const with Reference to a Pointers, let us first see what they are one by one: Pointers are used to store the address of variables or a...
read more
cpp-references
cpp-pointer
C++
C++-const keyword
Advanced Pointer
C++ Programs
How to modify a const variable in C?
Last Updated: 30 July 2024
Whenever we use const qualifier with variable name, it becomes a read-only variable and get stored in .rodata segment. Any attempt to modify this read-only variable will t...
read more
C Language
C-Pointers
C++-const keyword
C++ | const keyword | Question 5
Last Updated: 28 June 2021
Output of C++ program?[sourcecode language="C"]#include iostreamint const s=9;int main(){ std::cout s; return 0;}[/sourcecode]Contributed by Pravasi Meet(A) 9(B) Co...
read more
C Language
C++ Quiz
C++-const keyword
const keyword
C++ | const keyword | Question 5
Last Updated: 28 June 2021
[sourcecode language="C"]#include stdio.hint main(){ const int x; x = 10; printf(%d, x); return 0;}[/sourcecode](A) Compiler Error(B) 10(C) 0(D) Runtime Error Answ...
read more
C Language
C++ Quiz
C++-const keyword
const keyword
C++ | const keyword | Question 3
Last Updated: 28 June 2021
Predict the output of following program.[sourcecode language="C"]#include iostreamusing namespace std;class Point{ int x, y;public: Point(int i = 0, int j =0) { x = i...
read more
C Language
C++ Quiz
C++-const keyword
const keyword
C++ | const keyword | Question 2
Last Updated: 28 June 2021
In C++, const qualifier can be applied to1) Member functions of a class2) Function arguments3) To a class data member which is declared as static4) Reference variables(A) ...
read more
C Language
C++ Quiz
C++-const keyword
const keyword
C++ | const keyword | Question 1
Last Updated: 28 June 2021
Predict the output of following program[sourcecode language="CPP"]#include iostreamusing namespace std;int main(){ const char* p = 12345; const char **q = p; *q =...
read more
C Language
C++ Quiz
C++-const keyword
const keyword
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !