0% found this document useful (0 votes)
19 views

C Exercise

The document provides instructions for 19 coding exercises in C including programs to print name and address, perform basic math operations, use arrays, loops, functions, and multi-dimensional arrays. It includes exercises to find averages, check even/odd numbers, and area calculations.

Uploaded by

scribdacc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

C Exercise

The document provides instructions for 19 coding exercises in C including programs to print name and address, perform basic math operations, use arrays, loops, functions, and multi-dimensional arrays. It includes exercises to find averages, check even/odd numbers, and area calculations.

Uploaded by

scribdacc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1. Write a program to print your name and address.

2. write a program to get 4 inputs. 2 integers and 2 float numbers. sum both. store the result
in integer and float number. print 2 results.
3. create an integer array with length of 5. get 5 inputs, store them in the array. print all 5
outputs.
4. sum the numbers in the program 3 and print the result.

Tip for Multi dimensional Array

5. Create a C program to find subtraction of two integer number.


6. create a C program to print ASCII value of a character.
7. create a program to find cube of an integer number using two different methods.
8. create a program to find quotient and remainder.
9. create a Program to check whether number is EVEN or ODD.
10. create a program to find area and perimeter of circle.
11. create a program to find area of a rectangle.
12. create a program to get 2 strings. Name and city. Get the input from the user and print the
strings.
13. create a one dimensional array of strings. Get 5 strings. Concatenate them and print.
14. create a program with for loop. Get 10 inputs. Print them.
15. create a program with for loop. Get 10 inputs. Add the inputs. Print result.
16. create a program to get 10 subject marks of a student. Show the average.
17. create a two dimensional array of characters. In the row, fill out odd alphabet
(a,c,e…). In the column fill out even alphabets. Print them in reverse order Z-a
18. Write a function called print_big which receives one argument (an integer) and prints
the line x is big if the argument given to the function is a number bigger than 10.
19.
find out the average marks of a group of five students for two subjects, Mathematics and Physics.
To do this, we use a two-dimensional array called grades. The marks corresponding to Mathematics
would be stored in the first row (grades[0]), whereas those corresponding to Physics would be stored
in the second row (grades[1]). Complete the following steps so that you can execute this program.

 Declare grades as a two-dimensional array of integers


 Complete the for loops by specifying their terminating conditions
 Compute the average marks obtained in each subject

You might also like