I want to allocate dynamic memory for a single variable and in that variable I want to store a value 5
What should my codes be for this
Code:#include<stdio.h>
#include<stdlib.h>
int main ()
{
int *a = (int*) malloc (1 * sizeof(int)); // memory is allocated for varaible a
return 0;
}
What should my codes be for this