Menu
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY CYBERSECURITY DATA SCIENCE
     ❯   

C stdio remove() Function

❮ C stdio Library


Example

Delete a file:

remove("filename.txt");

Definition and Usage

The remove() function deletes a file.

The remove() function is defined in the <stdio.h> header file.


Syntax

remove(const char * filename);

Parameter Values

Parameter Description
filename Required. A string containing the path to the file to be deleted.

Technical Details

Returns: An int value which is zero if the file was successfully deleted. If an error occurred then a value other than zero is returned.

❮ C stdio Library