Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on What does a variable followed by parentheses ("ptr()") mean?
Post
What does a variable followed by parentheses ("ptr()") mean?
+5
−1
What does ptr()
mean in this code?
#include<stdio.h>
#include<stdlib.h>
void PrintHello()
{
printf("Hello\n");
}
int Add(int a, int b)
{
return a+b;
}
int main ()
{
void (*ptr)();
ptr = PrintHello;
ptr(); //For this specific line of code, what does it mean?
}
1 comment thread