C Language

How to use fputs in C

How to use fputs in C

The fputs function writes the string pointed to the output stream. The terminating null character is not written to the file. It takes two argument pointer to string and file pointer. Syntax of fputs in C int fputs(const char * restrict s, FILE * restrict stream);   Return value of fputs(): On success, the fputs […]

How to use fputs in C Read More »

How to use fputc in C

How to use fputc in C programming?

The fputc() function writes the character (unsigned char) to the output stream, at the specified position (indicated by the associated file position indicator) and then advances the indicator appropriately. It takes two arguments integer and files stream. The integer value is internally converted to an unsigned char. Syntax of fputc in C: int fputc(int c,

How to use fputc in C programming? Read More »

vector in C

How to implement a vector in C

In my previous article, I explained how to create a dynamic array in C. After reading the post, Many readers requested a guide on implementing a vector in C. A vector is essentially a dynamic array that stores a collection of elements same type in a contiguous memory. It has the ability to resize itself

How to implement a vector in C Read More »