Legal Ways To Call Void Functions | C Programming Tutorial

  Рет қаралды 4,736

Portfolio Courses

Portfolio Courses

Күн бұрын

Пікірлер: 32
@Rai_Te
@Rai_Te 5 ай бұрын
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.
@PortfolioCourses
@PortfolioCourses 5 ай бұрын
That’s true! :-) Anyone interested in learning about this may find this video on function pointers interesting: kzbin.info/www/bejne/nJDYiIKNi86MmZI
@bubbacat9940
@bubbacat9940 5 ай бұрын
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
@dhudach
@dhudach 2 күн бұрын
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.
@achv4668
@achv4668 5 ай бұрын
May i ask , what editor are you using ?
@PortfolioCourses
@PortfolioCourses 5 ай бұрын
Xcode on MacOS :-)
@RaimoIsokangas
@RaimoIsokangas 5 ай бұрын
Thank you so much for making these videos.
@PortfolioCourses
@PortfolioCourses 5 ай бұрын
You’re very welcome! :-)
@armaan4529
@armaan4529 5 ай бұрын
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
@CookiePepper
@CookiePepper 5 ай бұрын
, operator has defined order of execution now?
@NIKITA-jy5pv
@NIKITA-jy5pv 5 ай бұрын
Yep, always has been. It has undefined order of execution when calling functions, like passing parameters to it.
@PortfolioCourses
@PortfolioCourses 5 ай бұрын
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_marshal
@comrade_marshal 5 ай бұрын
Didn't know about the bracket operation
@harald4game
@harald4game 5 ай бұрын
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.
@Awwe12675
@Awwe12675 5 ай бұрын
Can you please explain thread all functions in library threads
@PortfolioCourses
@PortfolioCourses 5 ай бұрын
Thank you for the suggestion. :-)
@sravanakumar9326
@sravanakumar9326 5 ай бұрын
Thank you
@PortfolioCourses
@PortfolioCourses 5 ай бұрын
You're welcome! :-)
@Lmorphinya33
@Lmorphinya33 5 ай бұрын
Appreciate the explanation. Can you make a video about global variables. Thank you again❤❤❤
@PortfolioCourses
@PortfolioCourses 5 ай бұрын
Yes, this video should cover them: kzbin.info/www/bejne/p4m5eoCOZ6yfgZo
@PortfolioCourses
@PortfolioCourses 5 ай бұрын
And you might like this one too on sharing a global variable "across files": kzbin.info/www/bejne/jaLQYqeJr9Kkobs
@silloo2072
@silloo2072 5 ай бұрын
Thanks i didn't know that was a thing thank
@PortfolioCourses
@PortfolioCourses 5 ай бұрын
You're welcome! :-)
@Lmorphinya33
@Lmorphinya33 5 ай бұрын
Road to 200k ⏩
@PortfolioCourses
@PortfolioCourses 5 ай бұрын
:-)
@hoteny
@hoteny 5 ай бұрын
The only thing holding him from 10,000,000 subscribers is light theme
@briman113
@briman113 5 ай бұрын
Looks like 200K has been achieved 👍
@rezah336
@rezah336 5 ай бұрын
that was pretty useless, but fun
@kingeric1992
@kingeric1992 5 ай бұрын
return function1(), 0;
@vitalegvitalegov
@vitalegvitalegov 5 ай бұрын
Wow someone is using vanilla C in 2024 😮
@PortfolioCourses
@PortfolioCourses 5 ай бұрын
C forever! :-)
@mumbaiverve2307
@mumbaiverve2307 5 ай бұрын
C is almost the de facto programming language in embedded systems.
Segmentation Faults And Common Causes | C Programming Tutorial
10:51
Portfolio Courses
Рет қаралды 6 М.
struct Basics | C Programming Tutorial
24:44
Portfolio Courses
Рет қаралды 159 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Function Pointers | C Programming Tutorial
18:31
Portfolio Courses
Рет қаралды 71 М.
why do void* pointers even exist?
8:17
Low Level
Рет қаралды 402 М.
Rust Functions Are Weird (But Be Glad)
19:52
Logan Smith
Рет қаралды 147 М.
5 Things All C Programmers MUST Know (#5 is the Killer)
8:58
Code With Huw
Рет қаралды 24 М.
Dynamic Arrays in C
11:46
Dylan Falconer
Рет қаралды 73 М.
The ONE Thing Most C Programmers Get Wrong!
11:02
Code With Huw
Рет қаралды 34 М.
The What, How, and Why of Void Pointers in C and C++?
13:12
Jacob Sorber
Рет қаралды 55 М.
How To Return An Array From A Function | C Programming Tutorial
13:01
Portfolio Courses
Рет қаралды 70 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН