Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <stdio.h>
  2. #include "stdafx.h"
  3.  
  4.  
  5. int main ()
  6. {
  7.    const int fsize = 1024; //Size in kb
  8.    const int bsize = 1024; //size in bytes (Dont fuck with)
  9.    char buffer [bsize + 1];
  10.    int i;
  11.    
  12.    for(i = 0; i < bsize; i++)
  13.       buffer[i] = (char)(i%8 + 'a');
  14.    buffer[bsize] = '\0';
  15.  
  16.    FILE *pFile = fopen ("troll2.txt", "w"); //(File name to write to, and how to write. "w" is write. Dont fuck with it nigger -.-)
  17.    for (i = 0; i < fsize; i++) //The loop :D
  18.      fprintf(pFile, buffer); // Print in the abcdefgh :D
  19.  
  20.    fclose(pFile); //Close the file so we can use it futher on.
  21.  
  22.    return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement