What’s the difference of pData1 and pData2, which are build as follows:
pData1 = (int*) calloc (i,sizeof(int));
int * pData2 = (int*) calloc (i,sizeof(int));
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Without any more information, it would appear the only difference is that
pData2is local to the allocation since it is declared as anint *.pData1is not declared so it would have to have a larger (global?) scope and be defined elsewhere.