Please login to Subscribe to Guide.

Programming Solutions in C   Solutions to commonly founds programming exercises in C.


7 Sections , 42 Topics

The best way to learn any programming language is the practice. This guide provides solutions and explanations to common practice problems for beginners learning C programming language.

Curriculum


 Section  1  Input Output
1   Print rectangular pattern using asterisks - by using simple printf only!
2   Print your name - your own hello world!
3   Print input numbers in reverse order - not descending order but in reverse order!
5   Read and print integers in forward and reverse - go forward then reverse!
 Section  2  Functions
6   Multiply two numbers - what is 2 x 3?
7   Square and Cubes of a Number - cube(n) > square(n) form n> 1
9   Minutes to Hours - how many minutes are there in a day?
10   Compute area and perimeter of a right triangle - time to use the formula!
11   Is Bigger - Is product of digits of number greater than 5
 Section  3  Computation
12   Find the largest of 3 numbers - which is largest a or b or c?
13   Round floating-point number - time to make it round!
14   Divisibility Test - is a number divisible by others!
15   Calculate the grade - the more the better!
16   Find roots of quadratic equation - can be real or imaginary!
17   Parking Fee calculator - time to pay!
18   Calculate the bill - what would you like to buy!
19   Calculate slope on two points in the Cartesian plane - be careful, not to go down the slippery slope!
20   Find the smallest, largest and sum of 5 numbers - a menu driven program to investigate a set of numbers!
 Section  4  Loops
21   Find sum of first 10 numbers - simple case of loop!
22   Sum of input numbers - loop till the list one is entered!
23   Draw a pyramid using asterisks - time to draw a hill!
24   Print a solid square using asterisks - create a magical square!
25   Print a hollow square or rectangle using asterisks - hollow square are cool!
26   Draw Right Triangle - 90 degrees!
27   Triangular Number Pattern - 1,2,3,4,5 etc. but as a right triangle!
28   Half Diamond - a diamond is for forever, just like a true friend!
29   Chessboard Pattern - ready to play!
30   Print Summation of Numbers - show addition 1+2+3+4+5=15
31   Print Calendar months - lets book our calendars!
32   Separate and sum odd and even numbers - filter and add them!
33   Sum of positive numbers divisible by 3 - keep going till EOF!
 Section  5  Arrays
34   Find the largest of input numbers in an array - populate the array first!
35   Check array elements for equality - compare one for one!
36   Conditionally multiply array values by constant - update array in place!
37   Count even and odd element in array - again even and odds!
38   Read into a Two dimensional array - going 2D this time!
39   Create a 3 by 3 matrix array - 2D matrix magic!
40   Fill a square array - fill with 0 1 or -1!
41   Sum of elements of a 2D array - which row you want?
42   Search an array and return T/F - let's search!

Loading Please Wait...