问题一:简单申请结构体动态内存,对结构体中变量进行赋值;
实验代码:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 20
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
struct afuc
{
char *name;
char *banji;
int age;
int id;
};
int main(int argc, char *argv[]) {
struct afuc *a;
a=(