I have created a contribution page in civicrm and included profile with account creation required option enabled. But only Username field is displayed but not password and confirm password field.I'm using drupal 7 with civicrm. please suggest
This is the default behavior of Drupal, and is by design. It works the same way if you register a new account through the "New User Account" page in Drupal - assuming you don't have a module installed that modified this such as User registration password or LoginToboggan.
When a new user registers, the account will be created, and they'll receive an email with a one-time login link. They can set their password there.
This isn't something you can modify without writing custom code. This isn't really desirable because you'll need to make sure you're respecting the password complexity rules of Drupal. Making a user deal with this while making a contribution is going to reduce your conversion rate.