rename(), setbuf(), setvbuf(), sprintf(), sscanf() functions in C

rename() function: It is used to change the name of a file. new_file_name must be unique.


int rename(const char *old_file_name, const char *new_file_name);

setbuf() function: It is used to set or unset buffer for a stream.


void setbuf(FILE *stream, char *buf);

setvbuf() function: It is used to set buffer size and mode of a stream.


int setvbuf(FILE *stream, char *buf, int mode, size_t size);

sprintf() function: Same as printf() function, only output is held in buffer.


int sprintf(char *buf, const char *format, …);

sscanf() function: Same as scan() function, only input is read from array.


int sscanf(const char *buf, const char *format, …);

Leave a Reply