C - fwrite




File Operations in Tamil


C - fwrite

  • fwrite function writes the content in the file.
 c-fwrite

C Syntax

 fwrite(ptr, size, count, FILE *stream)

ptr − The pointer to the array of elements to be written.
size − Size of each object
count − The number of the objects
stream − pointer to the output stream

Example

#include <stdio.h> 
#include <conio.h>
int main()
{
    char a[10]={'1','2','3','4','5','6','7','8','9','a'};
    FILE *fp;
      fp=fopen("one.txt","w");
      fwrite(a,1,10,fp);
      fclose(fp);
    getch();
    return 0;
}

Output

 c-fwrite

Learn C - C tutorial - C fwrite - C examples - C programs



View More Quick Examples


Related Searches to c fwrite

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×