<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/const-const-pointers-and-pointers-to-const-things-in-c--cxba43qds" -->

---
title: Const, const pointers, and pointers to const things (in C)
description: The const keyword in C can be applied to variables and pointers in different ways. For simple variables, const can appear before or after the type (&quot;west...
canonical: https://daily.dev/posts/const-const-pointers-and-pointers-to-const-things-in-c--cxba43qds
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Const, const pointers, and pointers to const things (in C) | daily.dev
og:description: The const keyword in C can be applied to variables and pointers in different ways. For simple variables, const can appear before or after the type (&quot;west...
og:url: https://daily.dev/posts/const-const-pointers-and-pointers-to-const-things-in-c--cxba43qds
og:image: https://api.daily.dev/og/posts/cxba43QDS.png
og:image:alt: Const, const pointers, and pointers to const things (in C)
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.

# Const, const pointers, and pointers to const things (in C)

**[Jacob Sorber](https://daily.dev/sources/jacobsorber)** · 5 min read · 0 upvotes · 0 comments

## Summary

The const keyword in C can be applied to variables and pointers in different ways. For simple variables, const can appear before or after the type ("west const" vs "east const"). With pointers, there are two distinct things you can make const: the pointer itself, or the data it points to. A "pointer to const int" means you can't change the value through dereferencing, but you can reassign the pointer. A "const pointer" means the pointer address can't change, but you can modify the pointed-to value. You can also combine both to create a const pointer to const data.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=HpElPprsR0I>

---

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

[View this post on daily.dev](https://daily.dev/posts/const-const-pointers-and-pointers-to-const-things-in-c--cxba43qds)

```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":"Const, const pointers, and pointers to const things (in C)","url":"https://daily.dev/posts/const-const-pointers-and-pointers-to-const-things-in-c--cxba43qds","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/const-const-pointers-and-pointers-to-const-things-in-c--cxba43qds"},"datePublished":"2026-02-17T15:35:49.433Z","dateModified":"2026-02-17T15:36:07.144Z","description":"The const keyword in C can be applied to variables and pointers in different ways. For simple variables, const can appear before or after the type (\"west...","image":"https://i.ytimg.com/vi/HpElPprsR0I/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/HpElPprsR0I/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Jacob Sorber","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":"Jacob Sorber","logo":"https://media.daily.dev/image/upload/s--DYmm6K_p--/f_auto/v1710506159/logos/jacobsorber","url":"https://daily.dev/sources/jacobsorber"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/const-const-pointers-and-pointers-to-const-things-in-c--cxba43qds","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c","timeRequired":"PT5M","video":{"@type":"VideoObject","name":"Const, const pointers, and pointers to const things (in C)","description":"The const keyword in C can be applied to variables and pointers in different ways. For simple variables, const can appear before or after the type (\"west...","thumbnailUrl":"https://i.ytimg.com/vi/HpElPprsR0I/sddefault.jpg","uploadDate":"2026-02-17T15:35:49.433Z","duration":"PT5M","url":"https://api.daily.dev/r/cxba43QDS","embedUrl":"https://www.youtube.com/embed/HpElPprsR0I"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Jacob Sorber","item":"https://daily.dev/sources/jacobsorber"},{"@type":"ListItem","position":3,"name":"Const, const pointers, and pointers to const things (in C)"}]}
```

