Code:
FILE* open(const char filename[]) {
      FILE* fp;
      char c[10];
      printf(filename);
      fp = fopen(filename, "r");
      if (fp == NULL) {
         cout << " cannot open ";
      }
      else {
         cout << " opened\n";
      } 
      return fp; 
}
i need to make it like if i doesnt equal NULL it returns the pointer but if i does equal NULL i need to return false

also i can only use one exit (one return)