Do prisoners do anything useful in prison?

Useful in what ways? Useful to themselves? Yes, there are education programs available: anger management, parenting, moral reconation therapy, AA, NA, GED and so on... There are some programs that are provided by Employment Security that are designed to make inmates more employable when they get out. There are personal enrichment classes, religious study groups, physical fitness classes and team sports.

As far as useful to the public, yes to that as well. There are mandatory crews that work in public gardens, on the highways, yard work and landscaping around public buildings, public recreational trail maintenance, cemetery grounds maintenance, and DNR has inmate crews to maintain their lands, which includes inmate fire crews to fight forest fires.

Well, I have never been in prison, however, in juvenile detention there were a lot of programs / activities apart from education that I would count as useful. There were some workshops, a music band, even a theater club. Also, some of the typical counceling classes like AA and drug prevention programs.
Is C the mother of all major programming languages today e.g. C++, C#, Python, Java etc? Are these languages written in C?

The mother of all languages including the major ones is machine code, then is Lisp (basic language semantics) , then is Smalltalk (OOP, VM, Bytecode, TDD, MVC etc). Its actually machine code, if, loop, add, subtract , counting from zero etc its all machine code. I could have put Assembly second but Assembly is essentially

Can TATA Motors make efficient electric cars like Tesla Motors which will be cheaper than petrol or diesel cars?

Yes they can and they and Mahindra have delivered some cars to government,but those allotted these cars are complaining,opposing,due to various reasons.If TATA makes them at cheap cost nobody will buy in India, because nobody wants cheap car or anything cheap, Indian make, remember TATA Nano,So expect the car to cost RS.10 lakhs plus.

Will Tesla eventually make affordable cars, like cars that the general public can afford?

While some cars made by Tesla are sold to government agencies or corporations, most cars they sell are sold to the general public. Some people in the general public can afford more than others. The Model 3 is being sold for the average selling price of a new vehicle in the US, and far less with tax incentives.That