<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/medium-qywq6zdry" -->

---
title: Medium | daily.dev
description: A hands-on deep dive into what really happens when a C program calls printf(). Covers the full stack from glibc user-space functions through dynamic linking,...
canonical: https://daily.dev/posts/medium-qywq6zdry
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Medium | daily.dev
og:description: A hands-on deep dive into what really happens when a C program calls printf(). Covers the full stack from glibc user-space functions through dynamic linking,...
og:url: https://daily.dev/posts/medium-qywq6zdry
og:image: https://api.daily.dev/og/posts/QyWQ6zdRy.png
og:image:alt: Medium
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Medium

**[Medium](https://daily.dev/sources/medium_js)** · 7 min read · 0 upvotes · 0 comments

## Summary

A hands-on deep dive into what really happens when a C program calls printf(). Covers the full stack from glibc user-space functions through dynamic linking, buffering, the syscall CPU instruction, CPU privilege ring transitions (Ring 3 to Ring 0), system call numbers, register-based argument passing, and finally the Linux kernel. Includes 10 practical labs using tools like strace, ltrace, ldd, nm, gdb, and perf to observe each layer in action. Clears up common misconceptions: printf() is not a system call, malloc() doesn't always ask the kernel for memory, and most libc functions never enter kernel space.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@alwinaji717/user-space-mastery-from-printf-to-write-understanding-how-c-library-functions-become-linux-6541337c88e2>

## Similar posts on daily.dev

- [How a System Call Actually Works in Linux](https://daily.dev/posts/how-a-system-call-actually-works-in-linux-kj1mr4pdv) · freeCodeCamp · 1 upvotes · 0 comments
- [Calling a function in C without naming it](https://daily.dev/posts/calling-a-function-in-c-without-naming-it-kxojpx3bs) · Lobsters · 4 upvotes · 1 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#c](https://daily.dev/tags/c)

[View this post on daily.dev](https://daily.dev/posts/medium-qywq6zdry)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Medium","url":"https://daily.dev/posts/medium-qywq6zdry","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/medium-qywq6zdry"},"datePublished":"2026-07-21T07:33:15.230Z","dateModified":"2026-07-21T07:34:57.373Z","description":"A hands-on deep dive into what really happens when a C program calls printf(). Covers the full stack from glibc user-space functions through dynamic linking,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/medium-qywq6zdry","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,c","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Medium"}]}
```

