Because in the printf() you are printing string,since string gives the address of the first element that is 'a' here so it will start printing from 'a' till null character.