#include <iostream>
#include <string.h>
using namespace std;
int main(void) {
// put your setup code here, to run once:
#define BUFLEN 8 * sizeof(char)
#define BUFVAL '5'
#define BUFARR {BUFVAL,BUFVAL,BUFVAL,BUFVAL,BUFVAL,BUFVAL,BUFVAL,BUFVAL,0}
#define MODE 2
int i = 0;
#if (MODE == 0)
char empty_page[BUFLEN+1] = BUFARR;
#elif (MODE == 1)
char *empty_page = (char *)malloc(BUFLEN+1);
memset(empty_page, BUFVAL, BUFLEN+1);
#elif (MODE == 2)
char *empty_page = new char[BUFLEN+1]BUFARR;
#endif
empty_page[BUFLEN] = '\0'; // NULL Terminate always
for(i=0; i<BUFLEN; i++) {
printf("%c", empty_page[i]);
}
#if (MODE == 1)
free(empty_page);
#elif (MODE == 2)
delete[] empty_page;
#endif
return 0;
}