How to avoid changing constant values?

Answer Posted / jack

using const keyword with the variable.....

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are stacks? Give an example where they are useful.

584


what is Loop function? What are different types of Loops?

630


Can a constructor be private?

573


What is the difference between a pointer and a link in c ++?

558


When must you use a pointer rather than a reference?

596






Why should we use null or zero in a program?

591


Is there any difference between int [] a and int a [] in c++?

541


Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.

2086


Why #include is used?

606


Why do we need function?

590


How should a contructor handle a failure?

673


Are strings mutable in c++?

686


Write about the members that a derived class can add?

559


Explain the differences between list x; & list x();.

596


What does std :: flush do?

677