For the sake of completeness ... you can have a variable of type 'pointer to function returning void', assign your void function to this pointer (which basically copies the entry address of the function into the pointer) and finally call the function via the pointer.
@PortfolioCourses5 ай бұрын
That’s true! :-) Anyone interested in learning about this may find this video on function pointers interesting: kzbin.info/www/bejne/nJDYiIKNi86MmZI
@bubbacat99405 ай бұрын
I think if you are writing a wrapper around a void function it might be better practice to do "return func();" because if the definition of func() changes to output a type then you want a compiler error
@dhudach2 күн бұрын
Your videos are a great reference, clear and concise with excellent examples. My only comment, and hopefully I'm not being too picky, is your use of the word brackets [ ] instead of parentheses ( ). It might cause some confusion.
@achv46685 ай бұрын
May i ask , what editor are you using ?
@PortfolioCourses5 ай бұрын
Xcode on MacOS :-)
@RaimoIsokangas5 ай бұрын
Thank you so much for making these videos.
@PortfolioCourses5 ай бұрын
You’re very welcome! :-)
@armaan45295 ай бұрын
Hello sir, could you make a playlist on implementing data structures in c exactly like we use stl in c++ like for example we have to declare the size of array beforehand for stack implementation using arrays in c. But like the stl works we don't need to provide the size before using the stack. I want this for all data structures. Thank you and awesome content
@CookiePepper5 ай бұрын
, operator has defined order of execution now?
@NIKITA-jy5pv5 ай бұрын
Yep, always has been. It has undefined order of execution when calling functions, like passing parameters to it.
@PortfolioCourses5 ай бұрын
Yes that's correct, when calling functions it's technically being used as a "separator" and not as an "operator". That may actually be a good video topic, to make that clear...
@comrade_marshal5 ай бұрын
Didn't know about the bracket operation
@harald4game5 ай бұрын
void func() {} #pragma startup func #pragma exit func gcc: void __attribute__((constructor)) func(); void __attribute__((destructor)) func(); Not sure if it counts because it depends on the compiler.
@Awwe126755 ай бұрын
Can you please explain thread all functions in library threads
@PortfolioCourses5 ай бұрын
Thank you for the suggestion. :-)
@sravanakumar93265 ай бұрын
Thank you
@PortfolioCourses5 ай бұрын
You're welcome! :-)
@Lmorphinya335 ай бұрын
Appreciate the explanation. Can you make a video about global variables. Thank you again❤❤❤
@PortfolioCourses5 ай бұрын
Yes, this video should cover them: kzbin.info/www/bejne/p4m5eoCOZ6yfgZo
@PortfolioCourses5 ай бұрын
And you might like this one too on sharing a global variable "across files": kzbin.info/www/bejne/jaLQYqeJr9Kkobs
@silloo20725 ай бұрын
Thanks i didn't know that was a thing thank
@PortfolioCourses5 ай бұрын
You're welcome! :-)
@Lmorphinya335 ай бұрын
Road to 200k ⏩
@PortfolioCourses5 ай бұрын
:-)
@hoteny5 ай бұрын
The only thing holding him from 10,000,000 subscribers is light theme
@briman1135 ай бұрын
Looks like 200K has been achieved 👍
@rezah3365 ай бұрын
that was pretty useless, but fun
@kingeric19925 ай бұрын
return function1(), 0;
@vitalegvitalegov5 ай бұрын
Wow someone is using vanilla C in 2024 😮
@PortfolioCourses5 ай бұрын
C forever! :-)
@mumbaiverve23075 ай бұрын
C is almost the de facto programming language in embedded systems.