If temp is measure of avg energy of particles, then why not gases are the hottest? Temperature is just the measure of avg energy of particles.
&
Gases have particles with highest energy, then why it is that the stars are  hottest & not gasses.
Also core of stars is hottest (it is obvious) but shouldn't their gases also be hottest?
 A: 
Also core of stars is hottest (it is obvious) but shouldn't their gases also be hottest?

Our closest star fulfills your expectation. 

The core of the Sun extends from the center to about 20–25% of the solar radius. It has a density of up to 150 g/cm3 (about 150 times the density of water) and a temperature of close to 15.7 million kelvins (K).

As the radius gets larger , the temperature drops, BUT at the corona

an aura of plasma that surrounds the sun and other stars

The temperature rises again 

The corona is the next layer of the Sun. The low corona, near the surface of the Sun, has a particle density around 1015 m−3 to 1016 m−3. The average temperature of the corona and solar wind is about 1,000,000–2,000,000 K; however, in the hottest regions it is 8,000,000–20,000,000 K.
   Although no complete theory yet exists to account for the temperature of the corona, at least some of its heat is known to be from magnetic reconnection. The corona is the extended atmosphere of the Sun, which has a volume much larger than the volume enclosed by the Sun's photosphere.

It can be as hot as the core of the sun. It all depends on the specific boundary conditions. The core has nuclear reactions that supply the energy. There are as yet  no definitive models why the corona can be so hot.
In general it all depends  on energy supply and on volume,  temperature and pressure. The center of the sun has enormous pressures due to the gravitational field and enormous energy due to nuclear reactions.
