Function is a self-contained block of statement that perform a coherent tasks. using function we can divide a large program into the basic building blocks.
For more details click on the below link:
There are many functions we have already used before in our C program's such as- printf(), scanf(), pow(), sqrt() and most important function is main().
1. Write a C program to print sum of two numbers using functions.
2. Write a C program to print given number is even or odd using function.
3. Write a C program to print square of given number using function.
4. Write a C program to print factorial of given number using function.
5. Write a C program to check given number is prime or not using function.
6. Write a C program for swap two numbers using functions.
For more details click on the below link:
There are many functions we have already used before in our C program's such as- printf(), scanf(), pow(), sqrt() and most important function is main().
There are two types of function's in C:
Exercises and examples of function's:
1. Write a C program to print sum of two numbers using functions.
2. Write a C program to print given number is even or odd using function.
3. Write a C program to print square of given number using function.
4. Write a C program to print factorial of given number using function.
5. Write a C program to check given number is prime or not using function.
6. Write a C program for swap two numbers using functions.
You Might Like:
If you think above examples are helpful, then don't forget to share it with you friends and if you have any doubts then drop a comment in the comment section given below.
No comments:
Post a Comment
If you have any doubts, please discuss here...👇