Solution for Exercise 23-7
ex2307
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *test;
test=fopen("blorfus","w");
if(!test)
{
puts("Unable to create file");
exit(1);
}
fclose(test);
puts("File created");
if(rename("blorfus","wambooli") == -1)
{
puts("Unable to rename file");
exit(1);
}
puts("File renamed");
return(0);
}
Copyright © 1997-2025 by QPBC.
All rights reserved
