I have a silly doubt

1) int *ptr
int count=6;
ptr &count;

cout<<*ptr<<endl;

2) int *ptr=5

cout<<*ptr<<endl;

In both the cases the value of *ptr is 5. Then why do we always do it as in the first case