I'm learning C and I'm stuck in an exercise that asks you to store the data as follows.
Student Note and Student Name on the same line, and then with a chosen index determine the situation of the student, the part of manipulating the index and checking the grade of it I know how to do, but I am having problems in what it would be like doing this type of problem using vectors in C that receive an integer and a string that passes to 2 vectors.
Data example:
8.0 Ed Rex
9.0 Marcos Vice
1.0 Alan Pequenuxo
This would be my code
include stdio.h
include stdlib.h
include string.h
int main()
{
int n,i;
int nota[99];
char aluno[20][30];
scanf("%d",&n);
for (i=0 ;i < n; i++){
scanf("%d %s",¬a[i], &aluno[i]);
}
return 0;
}