- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 Articles
- 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 *?
- Difference between “int main()” and “int main(void)” in C/C++?
- What is the difference between size_t and int in C++?
- What is the difference between int and Int32 in C#?
- C/C++ difference's between "int main()" and "int main(void)"
- What is the difference between an int and a long in C++?
- Difference between void main and int main in C/C++
- Differentiate between int main and int main(void) function in C
- Difference Between int and long
- What is the difference between int and integer in MySQL?
- What is the difference between keywords const and readonly in C#?
- What is the difference between #define and const Keyword in C++?
- Difference between an Integer and int in Java

Advertisements