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.
Post History
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...
#4: Post edited
Regarding ' ptr( ); 'in this code & what does it mean?
- What does a variable followed by parentheses ("ptr()") mean?
I have a quick question, for the 'ptr( )' what does it mean here?- ```c
- #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?
- }
- ```
Apologies for the format of my question as I'm still trying to understand how to actually use Codidact :')
- What does `ptr()` mean in this code?
- ```c
- #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?
- }
- ```
#3: Post edited
- I have a quick question, for the 'ptr( )' what does it mean here?
#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?
- }
- Apologies for the format of my question as I'm still trying to understand how to actually use Codidact :')
- I have a quick question, for the 'ptr( )' what does it mean here?
- ```c
- #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?
- }
- ```
- Apologies for the format of my question as I'm still trying to understand how to actually use Codidact :')
#2: Post edited
- I have a quick question, for the 'ptr( )' what does it mean here?
- #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?
- }
- Apologies for the format of my question as I'm still trying to understand how to actually use Codidact :')
- I have a quick question, for the 'ptr( )' what does it mean here?
- #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?
- }
- Apologies for the format of my question as I'm still trying to understand how to actually use Codidact :')
#1: Initial revision
Regarding ' ptr( ); 'in this code & what does it mean?
I have a quick question, for the 'ptr( )' what does it mean here? #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? } Apologies for the format of my question as I'm still trying to understand how to actually use Codidact :')