$route['track']= 'C_track';
In a route, the array key contains the URI to be matched, while the array value contains the destination it should be re-routed to. In the above code, track is matched in the URI as final segment i.e. URI is delimited with / and broken into segments.
For handling http://localhost:8888/test/index.php/track/demo use
$route['track/(:any)']= 'C_track';
The above will match 1 segment after track with any type of value and redirect it to the controller 'C_track'. Furthermore, the reason behind /track/demo working if you change the controller as Track.php is because when you rename the controller to Track.php, the URI matches with this controller by default without the need of adding a custom route in Routes.php.