

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is difference between int and const int& in C/C++?
Here we will see what are the differences between int and const_int& in C or C++.
The int is basically the type of integer type data. And const is used to make something constant. If there is int& constant, then it indicates that this will hold the reference of some int type data. This reference value is constant itself. So the const is redundant. The compiler may return warning or some error.
The const int& is same as int const&. So this refers to a constant integer. The integer cannot be modified through the reference.
- Related Questions & Answers
- Difference between const int*, const int * const, and int const * in C/C++?
- Difference between const int*, const int * const, and int const * in C
- What is the difference between const int*, const int * const, and int const *?
- What is the difference between size_t and int in C++?
- What is the difference between int and Int32 in C#?
- What is the difference between an int and a long in C++?
- Difference between “int main()” and “int main(void)” in C/C++?
- Difference between void main and int main in C/C++
- Difference Between int and long
- What is the difference between int and integer in MySQL?
- C/C++ difference's between "int main()" and "int main(void)"
- Differentiate between int main and int main(void) function in C
- What is the difference between #define and const Keyword in C++?
- What is the difference between keywords const and readonly in C#?
- Difference between #define and const in C
Advertisements