Question on Camera in Blender

I was wondering is their any way to snap the camera in blender to the angle you are looking at a object in the viewport.
I think there might be a hotkey but I can’t remember. Any help would be appreciated.

derp. nevermind

Switch to perspective view and hit Ctrl + Alt + 0 (Numpad)

Thanks
Much Appreciated!