Author: Prashant N Mhatre
I've working knowledge of a bunch of programming languages but job demands to learn a new language frequently in a short time. Instead of reading hundreds manual/book pages, I quickly read 10-15 pages of tutorial or primer. (As you know google is the best search engine to look for such stuff). I keep
First of all, get familiar with Compiler, compiler option, editor shortcuts or integrated development environment (IDE). Start with a simple 'Hello World' program. Compile it. Use basic functionalities of debugger like setting break points, printing variable values, moving to the next or specific position, stopping debugger etc.
To grasp basics of a new language quickly, here are the exercises I use. Remember some programs may not good for beginners.
(1) Display series of numbers (1,2,3,4, 5....etc) in an infinite loop. The program should quit if someone hits a specific key (Say ESCAPE key).
(2) Fibonacci series, swapping two variables, finding maximum/minimum among a list of numbers.
(3) Accepting series of numbers, strings from keyboard and sorting them ascending, descending order.
(4) Reynolds number is calculated using formula (D*v*rho)/mu Where D = Diameter, V= velocity, rho = density mu = viscosity Write a program that will accept all values in appropriate units (Don't worry about unit conversion) If number is < 2100, display Laminar flow, If it's between 2100 and 4000 display 'Transient flow' and if more than '4000', display 'Turbulent Flow' (If, else, then...)
(5) Modify the above ( Next Page )
Rate this article:




(No ratings yet)
