1

Can anyone explain the meaning of the code and give an example how to use it? I can understand foo[100], but not bar.

typedef struct{
   int a,b;
} CELL, *PCELL;

CELL foo[100];
PCELL bar(int x, CELL y);
2
  • 1
    Yes, it is a homework Commented May 25, 2020 at 14:41
  • bar is a function that gets two parameters an int and CELL and return *PCELL Commented May 25, 2020 at 14:43

1 Answer 1

2
PCELL bar(int x, CELL y);

is a function declaration. It means that bar will take in an int and a CELL as parameters, and it will return a pointer to a CELL as a return value. The actual body of the function will be defined later.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very match, I understand it now. Before I thought bar is a variable not a function. I will accept your answer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.