Skip to content

Tag Archives: const keyword

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(),… Read More
Run-time Constant: These are the constants whose respective values can only be known or computed at the time of running of source code. Run time… Read More
Prerequisite : C Constants and StringsQ.1 What is the output of this program?   CPP #include<iostream> using namespace std; int main() {     const char *s =… Read More
Output of C++ program? #include <iostream> int const s=9; int main() {     std::cout << s;     return 0; } Contributed by Pravasi Meet (A) 9 (B)… Read More
#include <stdio.h> int main() {    const int x;    x = 10;    printf("%d", x);    return 0; } (A) Compiler Error (B) 10 (C) 0 (D) Runtime… Read More
Predict the output of following program. #include <iostream> using namespace std; class Point {     int x, y; public:  Point(int i = 0, int j =0)… Read More
In C++, const qualifier can be applied to 1) Member functions of a class 2) Function arguments 3) To a class data member which is… Read More
Predict the output of following program #include <iostream> using namespace std; int main() {     const char* p = "12345";     const char **q = &p;     *q… Read More

Start Your Coding Journey Now!