Name of function cannot be any keyword of c program

In c programming language a function name cannot be any keyword of c language. Function name can be keyword of c++ but it is bad practice. If function name is keyword of c language we will cause of compilation error.


int main(){
   int num,count;
   printf("\nEnter a number:");

      printf("%d is a prime number",num);
      printf("%d is not a prime number",num);

   return 0;

int interrupt(int num){
   int i,count=0;

   return count;

Output: Compilation error
Explanation: interrupt is keyword of c language. It cannot be function name.

No comments: