Name of function includes only alphabets, digit and underscore in c

A function name in c can  have only alphabet,digits and underscore. If we will use any other characters in the function name then we will get a compilation error.

int main(){
   int min=1,max=100;
   int sum;
   sum=sum ofdigit(min,max);
   printf("sum = %d",sum);
   return 0;
int sum of digit(int min,int max){
  int total;
  total=(min+max)* (max-min+1)/2;
  return total;

Output: Compilation error
Explanation: Function name cannot have blank space characters.

Valid name: world, addition23, sum_of_number etc.
Invalid name: factorial#, avg value, display*number etc.

No comments: