CODE MUST BE IN C
For the assignment and the lab next week use malloc function toallocate space (to store the string)
instead of creating fixed size character array. malloc functionallows user to allocate memory (instead of
compiler doing it by default) and this gives more control to theuser and efficient allocation of the
memory space.
Example
int *ptr
ptr=malloc(sizeof(int)*10);
In the example above integer pointer ptr is allocated a space of 10blocks this is same as creating as array
int ptr[10] but here malloc function is used which allows the userto decide how much memory is
required.
Another example
char* string;
string = malloc(sizeof(char) * 15); //has room for 15characters
Not even declaring
PayPal Gateway not configured
PayPal Gateway not configured