I suppose he smiled at Cody—he had probably discovered that people liked him when he smiled. At any rate Cody asked him a few questions (one of them elicited the brand new name) and found that he was quick and extravagantly ambitious.
Gatsby learns early on how charm and ambition can help him reshape his identity and move closer to his dreams.