how to add fields for drupal registration form internally souce code of drupal7.17 application
To add the fields to user profile you should use Profile2 module.


With profile2 user account settings and user profiles are
conceptually different things, e.g. with the "Profile pages" module
enabled users get two separate menu links "My account" and "My
profile".
Profile2 allows for creating multiple profile types, which may be
assigned to roles via permissions (e.g. a general profile + a
customer profile)
Profile2 supports private profile fields, which are only shown to the
user owning the profile and to administrators.