Back to Browse

C Basics Function Pointers Structs Pass By Ref

50 views
May 19, 2026
19:24

If you have coded in C before, let us refresh the basics. C is old, but it is still one of the fastest languages. It is also portable since you can compile it for many machines. We will review strings, pointers, functions, and function pointers for callbacks. We start with a simple string and printf using percent s. Then we allocate memory with malloc, read input with scanf using percent s, and remember to free the memory. Next we set up a callback using a function pointer and fix the tricky syntax by matching types, since mixing char and int can wrap and print odd values. After that we pass an int by reference with an int pointer, use dereference to change the value, and print before and after.

Download

0 formats

No download links available.

C Basics Function Pointers Structs Pass By Ref | NatokHD