View the step-by-step solution to:

I'm not sure where I am going wrong #include <stdio.h> int square(int y);//function prototype int main()//Main Function { int number; printf("Enter...

I need help debugging this c program. I'm not sure where I am going wrong

#include <stdio.h>

int square(int y); //function prototype

int main() //Main Function


  int number;


  printf("Enter a value: ");

  scanf("%d", &number);


  printf("nThe Square of the number is %dnn", square(number)); //function call


int square(int y) //function definition


  return y * y;


  return 0;


Top Answer

hi, here is the code #include &lt;stdio.h&gt; int square ( int y) ; //function prototype int main () //Main... View the full answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.


Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online