Here when function is called then temp pointer array of char is been created and is stored the value 'Gate2019'
and return statement contains the starting address of temp
so for string from obtained address till end until it finds null value is printed
Therefore from temp starting address till end value will be printed so Gate2019 will be printed