How to get cookie from response using curl

Hi i want to read cookie from the response using curl and need to pass it again for further request. can any one tell how to do that