I want to create a dynamic main menu according to user roles. For example if an anonymous user visits he can only see the 'Home' and 'About Us' links, while registered users can see additional links like 'Contact Us'. Is there a way to do that, through a module perhaps? I don't want to edit in source code.
You can use Menu per Role module.
Project page says:
This module allows you to restrict access to menu items based on user roles. It depends on the Drupal core menu.module just activate both modules and edit a menu item as usual. There will be a new fieldset that allows you to restrict access by role. The fieldset also appears in the node edit form.