Ask your own question, for FREE!
Computer Science 12 Online
OpenStudy (anonymous):

Point out the correct statement will let you access the elements of the array using 'p' in the following program?

OpenStudy (anonymous):

#include<stdio.h> #include<stdlib.h> int main() { int i, j; int(*p)[3]; p = (int(*)[3])malloc(3*sizeof(*p)); return 0; } A. for(i=0; i<3; i++) { for(j=0; j<3; j++) printf("%d", p[i+j]); } B. for(i=0; i<3; i++) printf("%d", p[i]); C. for(i=0; i<3; i++) { for(j=0; j<3; j++) printf("%d", p[i][j]); } D. for(j=0; j<3; j++) printf("%d", p[i][j]);

OpenStudy (anonymous):

C

OpenStudy (anonymous):

Thanks

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!