What is the difference between int and register int in C/C++?

Depends on the version of C++:
In C++17 your code will not compile with the (still reserved) keyword. Before C++17 it’s a deprecated reserved word.
In C, it’s used to indicate to the compiler than you’d like to hold the value of the variable in a register.
The compiler may ignore this, or it may not, but the idea is that if you put something in a register, it’ll be accessed much faster than if it’s regular memory.

Comments