Does C needs to be hooked up to Ground also, because the data sheets say it can have 5v DC so where do i hook that up.
Wiring the C to ground makes the interface simpler as you can then enable the internal pullups for the digital input pins. You can of course wire the C to +5vdc, but then you need to have external pulldown resistors for each of the digital input pins. Be aware that these kinds of encoders can have lots of contact bounce that have to be dealt with either with external filtering components or software debouncing routines.