function vs. &function Pointers | C Programming Tutorial

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Wonderful video !!! using not just c programming but tools like the command line "diff" as well!!! Didn't learn what is a "function pointers" yet but I think with this video I'll enjoying it !! thanks a lot !

zoquevil
Автор

Amount of knowledge u have is amazing
Superb vid

TechnoSan
Автор

Bro, who are you?! Thank you for all your work and may God bless you and your family.

madesimple
Автор

Thanks for clarifying this, it's funny I got here because I got confused of pthread_create function too, and how the function requires a pointer to a function but u still can pass the function name only without the AND operator.

justcurious
Автор

can you give some exercise in pointer function please

coding-code
Автор

It's the same difference as with `char *a = "AAA";` and `char a[] = "AAA";`. First is a pointer to a static text literal and you can't edit it because it can be stored in read-only memory. Second creates an array of chars of same length as of the intializer list (which is string literal with in that case).
Function name is the actual function object that degrades to pointer when assigned to one (or passed in as function parameter). Address of the function is just an address, and it is stored in variable that can be edited later. Taking an address of the function name is useless because it degrades to one automatically. Dereferencing it back is useless too, because it looks like function call operator accepts pointer to the function too and in my code it compiles without warnings with -Wall -Wextra -pedantic and standard is chosen. The last one is just my assumption, but I think it is how it works.

rogo
Автор

can we have a video explaining variable function arguments.

-chaaoui
Автор

Greetings! 🇸🇪 You sound like a Canadian. 😊

mirabilis
Автор

Nice video, could you do something on Message passing interface and maybe mix it with pthreads. it’s a good idea I guess 😂

Lklibertad
Автор

1:10 Did you know that if you really want a function to have no parameters you have to write void. If you leave it empty you could theoretically put in any amount of parameters you want, for example 1 parameter or 5 parameters or 3 billion. This is kinda off topic but just wanted to let you guys know.

Amar-pbbf