How to change constant values?
Answers were Sorted based on User's Feedback
Answer / udit
const int var=10;
*(int *)&var=20;
this syntex change the constat value
Is This Answer Correct ? | 15 Yes | 10 No |
Answer / asif karim
#include <stdio.h>
#include<iostream>
using namespace std;
void main()
{
const int var=10;
int a;
a=*(int* )& var=20;
cout<<a;
}
Is This Answer Correct ? | 3 Yes | 10 No |
Explain terminate() function?
Explain public, protected, private in c++?
Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.
Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.
What is copy constructor? Can we make copy constructor private in c++?
What is a stack? How it can be implemented?
What is a list c++?
What do you mean by a template?
Write a C++ program which will compute the volume of a sphere or a cylinder after prompting the user to type the first character for the shape name.
0 Answers An-Najah National University,
What is the type of this pointer in c++?
What is ios class in c++?
what is data abstraction in C++?