Skip to main content

Posts

Showing posts with the label types of functions

Types of Functions in C Programming

C program has two types of functions: 1. Library Functions 2. User defined functions Library Functions: These are the functions which are already written, compiled and placed in C Library and they are not required to be written by a programmer. The function’s name, its return type, their argument number and types have been already defined. We can use these functions as required. For example: printf(), scanf(), sqrt(), getch(), etc. User defined Functions: These are the functions which are defined by user at the time of writing a program. The user has choice to choose its name, return type, arguments and their types. The job of each user defined function is as defined by the user. A complex C program can be divided into a number of user defined functions. For example: #inlcude<stdio.h> double convert (int) ; /* function proto type */ main() { int c ; /* double d ; */ printf (“Enter temperature in Celsius: ”) ; scanf (“%d”, &c) ; /* d =...