Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include * OBS Student structure definition */ struct student int StudentID: char *Student_Name; }; int main(void) { int hash; int hash_generator=4; struct student You; /*
#include * OBS Student structure definition */ struct student int StudentID: char *Student_Name; }; int main(void) { int hash; int hash_generator=4; struct student You; /* create a variable instance of student structure which is You */ * Define student You information here BEGIN */ You. StudentID = You. Student_Name = * Define student You information here END */ hash = You. StudentID % hash_generator; printf(" Hash obtained from your student ID number is %d ", hash): printf(" 'n After calculating the hash, the RESULT is %c ", (You. Student_Name[hash])); return 0; /* indicates successful termination */ } /* end main */ 4) For the above C code (DO NOT WRITE YOUR OWN C CODE, USE THE ABOVE C CODE) make necessary changes (delete, add, change line orders etc) to define pointer you, which will point to structure student (NOTE that You is a different variable and variables are case sensitive in C and therefore "You" and "you" are different). In addition change the printf line, so that when pointer you is used, it will give exactly the same result with You (10 Points)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started