Question: What is difference between 

```
int x=7;

```

and 

```
register int x=7;

```

?

I am using C++.

Answer: 
Almost certainly nothing.

`register` is a hint to the compiler that you plan on using `x` a lot, and that you think it should be placed in a register.

However, compilers are now far better at determining what values should be placed in registers than the average (or even expert) programmer is, so compilers just ignore the keyword, and do what they wants.
Consider a case when compiler's optimizer has two variables and is forced to spill one onto stack. It so happened that both variables have the same weight to the compiler. Given there is no difference, the compiler will arbitrarily spill one of the variables. On the other hand, the `register` keyword gives compiler a hint which variable will be accessed more frequently. It is similar to x86 prefetch instruction, but for compiler optimizer.

Obviously `register` hints are similar to user-provided branch probability hints, and can be inferred from these probability hints. If compiler knows that some branch is taken often, it will keep branch related variables in registers. So I suggest caring more about branch hints, and forgetting about `register`. Ideally your profiler should communicate somehow with the compiler and spare you from even thinking about such nuances.