Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how can i solve the poblem

+1 vote
asked Jun 13, 2021 by Bayan Salim (130 points)
main.c: In function ‘main’:
main.c:37:15: warning: comparison between pointer and integer
 if (collusion == 'Y')
               ^~
main.c:51:8: warning: ‘return’ with a value, in function returning void
 return totalmarks;//returning total marks of the student back to the main function
        ^~~~~~~~~~
main.c:2:6: note: declared here
 void main()//this is a main function
      ^~~~
main.c:59:14: error: called object ‘plagiarismfn’ is not a function or function pointer
 finalmarks = plagiarismfn(100, 1);
              ^~~~~~~~~~~~
main.c:47:7: note: declared here
 float plagiarismfn;float totalmarks; float plagiarism;
       ^~~~~~~~~~~~

2 Answers

+1 vote
answered Jul 3, 2021 by xDELLx (10,520 points)
Of all the mistakes shown by compiler, only 1 is an error, on Line #59.

on Line #47 you have declared plagiarismfn as a float variable, so you cant treat as a callable object , that is use it like a function call with 2 arguments., as you did on line #59.

But, you will need to share the entire code for checking.Also the other warnings may let you generate a binary , it will sure casue a crash, so please correct all warning .
commented Jul 6, 2021 by JB (100 points)
please share entire code so that the error can be properly understood and debugged
0 votes
answered Jul 8, 2021 by Shaik Hussain Valli (140 points)
Hey dude u have used a void so that it can't return anything instead of that try to use main function to return something
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...