#include<stdio.h>
#include<conio.h>
typedef struct Student
{
char nume[20],situatie[11];
int grupa,nr_credite;
} S;
void fct()
{ 
int n,i,c;
S st[100];
scanf("%d %d", &n, &c);
for(i=0;i<n;i++)
    scanf("%s %d %d", &st[i].nume, &st[i].grupa, &st[i].nr_credite);
for(i=0;i<n;i++)
    if (st[i].nr_credite>=n) st[i].situatie="Promovat";
                else st[i].situatie="Nepromovat";
}
int main()
{
fct();
return 0;
}
For the given code, this is the error I am getting.
Error: C:\Users\Rebekah\Downloads\e\main.c|20|error: assignment to expression with array type|
What am I missing here?


situatieis array ofchar. Instead ofst[i].situatie="Promovat", usestrcpyto copy string.