Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main () {
char *temp;
int size = 1396899840;
temp = (char *) malloc (size);
if (!temp) {
fprintf (stderr, "Error in allocating memory");
exit (-1);
}
memcpy (temp, "Jagadeesha",size);
printf ("temp : %s", temp);
}
Comment