perror - Display the error by using the default function in C


  #include <stdio.h>
  #include <stdlib.h>

  int main()
  {
  perror("ForgetCode Error");
  return 0;
  }

Output:ForgetCode Error