Dummy File Watcher in C

In this article we will build a dummy file watcher using C programming language. We say dummy file watcher because to build a proper file watcher, we need to utilize os internal features which is a bit more complex. Instead, we will create an infinite loop that checks a given directory every 0.5 second and see if something has changed. First thing we need to do is to create a function that tells if something has changed in a given directory. ...

July 6, 2024 · 2 min · Deni Andrian Prayoga
Source: DALL-E

Review of Pointer in C

In this short article we will review pointers in C programming language, if you are new to this kind of topic please read the tutorial of pointers for beginners first, try this tutorial for example. Defining Pointer There are several ways to define a pointer in C. int* p; int x = 5; p = &x; // p pointer to address x we can assign the address right away like so int x = 5; int* p = &x; Dereferencing Pointer Use * to dereference a pointer, this will return the value that the address of pointer is pointing at holds. ...

July 3, 2024 · 2 min · Deni Andrian Prayoga
Source: [unsplash](https://unsplash.com/photos/a-building-with-a-clock-on-the-side-of-it-YWR9NKDHnls)

Dynamic Array in C Simplified

Array data structure is really useful, it can used to to store value with same data types, we can access it really easy, updating the value of array is also a trivial thing to do. One of the most important use of array is that is it used to implement other more complex data structures such as linked list, binary tree and hash tables. But what is greater than array? Yup, dynamic array. ...

July 2, 2024 · 4 min · Deni Andrian Prayoga