You did allocate space but you you are passing the wrong thing. Try this:
#include <stdio.h>#include <stdlib.h>int main(){ int num = 1; char test[8]; sprintf(test,"%d",num); printf("%s\n",test);}
You did allocate space but you you are passing the wrong thing. Try this:
#include <stdio.h>#include <stdlib.h>int main(){ int num = 1; char test[8]; sprintf(test,"%d",num); printf("%s\n",test);}