1번 코드
[code:1]#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct A
{
int a;
char b[30];
};
struct A *function(int *count)
{
int i=0;
char temp[30];
struct A *test;
test = (struct A *)malloc(sizeof(struct A) * 10);
for(i=0; i<10; i++)
{
test[i].a = i*10;
sprintf(temp, "temp[%d]=%d", i, i);
strcpy(test[i].b, temp);
}
*count = i;
return test;
}
int main()
{