This is 10 years less than the median age at American technology giant Oracle, according to data from PayScale, an online provider of employee compensation data.

The composition of TCS employees is a reflection of India's young and burgeoning working-age population — a competitive edge that sets Asia's third-largest economy apart from countries across the world, many of which are aging fast.

"A young workforce means having more innovative minds. It also means we are able to better leverage technology and increase efficiency," said Ranjan Bandyopadhyay, global HR head of business process outsourcing for TCS.

Like TCS, the median age of India's population as a whole is 28, significantly lower than that of regional peers China and Japan, at 37.6 and 44.4, respectively, according to data from global market research firm Euromonitor.

India's workforce, those between 15 and 64, is expected to rise from almost 64 percent of its population in 2009 to 67 percent in 2020. Meanwhile, China's is expected to start declining from 2014 resulting in a labor shortfall by 2050, according to some estimates.

"India has close to ideal demographics. It's in a sweet spot," said Robert Prior-Wandesforde, director, Asian economics research at Credit Suisse. "As the population's working age expands, savings increase — and that turns into a source of funding for investment. This will be beneficial for the country's competitiveness as other countries age,"

India's "demographic dividend" — the window of opportunity that a large workforce creates to strengthen an economy — could add 2 percentage points to the country's annual growth rate over the next two decades, the International Monetary Fund said in 2011.

While growth in India has been slowing this year, the economy has on average grown close to 8 percent annually over the last five years, helped in large part by this demographic dividend.

"A growing workforce is an advantage for both the manufacturing and services sectors in India. Not only do businesses have access to people that are young and physically fit, it means less cost pressures, particularly on the wage front, because of the availability of labor," said Arvind Singhal, chairman of consultancy firm Technopak Advisors.

Compelling Consumption Story

India's youthful population is also contributing to India's consumption boom.

Between 2006 and 2011, consumer spending in the country almost doubled, from $549 billion to $1.06 trillion. Sunil Devmurari, country manager for India at Euromonitor, said this is just the beginning.

(Read more: What the Powerful Indian Consumer Is Buying)

"Two hundred and fifty million people are set to join India's workforce by 2030. As a big chunk of the population shifts into the working age group, the offshoot of that is an increase in disposable incomes and conspicuous consumption. This is the most exciting aspect of India's demographic dividend," Devmurari said.

The country's favorable dynamics, accompanied by the population's growing propensity to spend, have lured investors. For example, New Silk Route, a $1.4-billion global private equity firm headquartered in the U.S., has invested in a vegetarian fast food chain in South India called Adigas and Café Coffee Day, India's equivalent of Starbucks .