Answered step by step
Verified Expert Solution
Link Copied!

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; /*

image text in transcribed

#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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

3. You can gain power by making others feel important.

Answered: 1 week ago