Adventures in C
If you’re more familiar with Python and you want to learn C you’ll need to tackle pointers…
Let’s look at an example :
The first thing you may notice is that there is no need for a “return” from the function….
Example 1 – Pointers
#include<stdio.h>
void tripler(int *p);
int main(){
int num = 5;
int *ptr;
ptr = #
tripler(ptr);
printf("%d",*ptr);
}
void tripler(int *p){
*p = *p * 3;
}

pointer and address of operator
Example 2 – Pointer that updates conditionally, based on values read from an array

Example 3 – How to convert seconds into h:m:s

Example 4 – Hundreds, tens, units from a 3 digit integer.

2d Arrays in C

