How to make a a .ABC file? Help

Borna44

Honorable
Nov 17, 2013
1
0
10,510
0
So for class i need to make a .abc o have the code in txt and everything but how do i make in to .abc now????? Please help VERYYYY APRECIATED
 
Code:
#include <stdio.h>
int main( int argc, char **argv) {
    FILE *fp = fopen( "file.abc", "w");
    if (fp) {
        fprintf( fp, "This is my file\n");
        fclose( fp);
        return 0;
    } else {
        printf( "Unable to open file for writing\n");
        return 1;
    }
} // main
 

Ijack

Distinguished
As I understand your question, you have a file "file.txt" but want it to be "file.abc". Assuming that you are using Windows there are a number of ways to do this. The simplest is to use the command

rename file.txt file.abc

In a command prompt.
 

ASK THE COMMUNITY