In this program, a structure (student) is created which contains name,subject and marks as. Here is source code of the C program to calculate The Marks and the grades of Students. C Program Print First N Prime Number using Recursion.
Const char.firstGrade = (.(const char.) first) - grade; const char.secondGrade = (.(const char.) second) - grade; 'first' is cast to a double pointer to char, which is then dereferenced, so you have a char. You then dereference that with the - to a char, and char isn't a struct or union and doesn't have a member grade (because it can't). Same problem lower for name. That said, I don't see where you are populating nameArray or gradeArray, so even if you fix the compilation errors, you're going to have numerous runtime errors.
![C Program To Calculate And Print Student Grade Using Structure C Program To Calculate And Print Student Grade Using Structure](/uploads/1/2/5/3/125355277/111405110.jpg)
Okay, I think i see where you are going with this, but there is one question I have. Where does each grade letter get assigned the 0-4 value, or is the user doing that by entering the number? I only ask, because I think the instructor is wanting the use to type a letter grade. Is there a way to make that happen? If not, I'll just change my code to do something along the lines of what you ahve posted here.
![C Program To Calculate And Print Student Grade Using Structure C Program To Calculate And Print Student Grade Using Structure](/uploads/1/2/5/3/125355277/457045135.jpg)
By the way, thanks for your quick help!! Where cout is output to the screen, cin is input from the user. Use cin to store a value typed in by the user into a variable. Look over my program again with this in mind and you'll see what I did.