+ 4

Please help me with this question in c[solved]

Question: "You are given two lists of register numbers. One list consists of Register numbers of all the students in a class (Nominal roll) and other list consists of students who have passed in the End semester exam. Find the list of students who failed in the End semester exam. Use pointer to access array element." Here is my try https://code.sololearn.com/cAOFuS6toAK3/?ref=app

19th Apr 2021, 8:56 AM
k R :)
k R :) - avatar
5 odpowiedzi
19th Apr 2021, 12:01 PM
Programmer Raja
Programmer Raja - avatar
+ 3
1. You have pointer *p and regular variable with the same name, which is not allowed. 2. You have to allocate memory for your pointers, you can't access them randomly, so use malloc() function to allocate memory. 3. When you allocate memory, you have to free it, so use free() function at the end of your program, or whereever you want to free the memory. 4. You can't output stuff like "printf(q[i]);", you have to specify the type of variable, same as you did before
19th Apr 2021, 10:42 AM
Michal Doruch
+ 3
Michał Doruch thank you for pointing out the errors I changed the code but there is a logical error in this code I don't know how to do it(please don't mind the pointers as of now)
19th Apr 2021, 10:56 AM
k R :)
k R :) - avatar
+ 3
Thank you very much Programmer Raja (தமிழன்) bro🤩🤩
19th Apr 2021, 12:17 PM
k R :)
k R :) - avatar
+ 3
k R :) 😁👍
19th Apr 2021, 12:18 PM
Programmer Raja
Programmer Raja - avatar