Using of f putc(); and printing A To Z in file

#include<stdio.h>

int main(){

  FILE *fb;

  char ch;

  fb = fopen ("file.txt","wt");

  for (ch ='A';ch <='Z';ch++){

    putc(ch ,fb);

    fprintf(fb,"\n");

  }

  

  fclose(fb);

  return 0;

}

Comments

Popular posts from this blog

Snake game.c

Type declaration

Array with function