根据建议,我已经修改了代码,但是如何初始化结构中的单个元素?
#include<stdio.h>
typedef struct student
{
int roll_id[10];
int name_id[10];
} student;
int main()
{
student p = { {0} }; // if i want to initialize single element ''FIX HERE, PLs''
student *pptr=&p;
pptr->roll_id[9]={0}; // here is the error pointed
printf (" %d\n", pptr->roll_id[7]);
return 0;
}