C Language: remove function(Remove File)

In the C Programming Language, the remove function removes a file pointed to by filename.

Syntax

The syntax for the remove function in the C Language is:




int remove(const char *filename);



Parameters or Arguments

filename

The file to delete.

Returns

The remove function returns zero is successful, otherwise nonzero.

Required Header

In the C Language, the required header for the remove function is:




#include <stdio.h>



Applies To

In the C Language, the remove function can be used in the following versions:

  • ANSI/ISO 9899-1990

stdio.h Functions





Instagram