<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/what-is-stream-orientation-fwide--8crmjhifj" -->

---
title: What is stream orientation? (fwide) | daily.dev
description: Stream orientation in C determines whether a stream works with byte-oriented functions (like printf) or wide-character functions (like wprintf). Mixing these...
canonical: https://daily.dev/posts/what-is-stream-orientation-fwide--8crmjhifj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: What is stream orientation? (fwide) | daily.dev
og:description: Stream orientation in C determines whether a stream works with byte-oriented functions (like printf) or wide-character functions (like wprintf). Mixing these...
og:url: https://daily.dev/posts/what-is-stream-orientation-fwide--8crmjhifj
og:image: https://api.daily.dev/og/posts/8CrMjHiFJ.png
og:image:alt: What is stream orientation? (fwide)
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.

# What is stream orientation? (fwide)

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

## Summary

Stream orientation in C determines whether a stream works with byte-oriented functions (like printf) or wide-character functions (like wprintf). Mixing these function types on the same stream causes undefined behavior. The fwide() function checks or sets a stream's orientation: negative values for byte-oriented, positive for wide-oriented, and zero to check without changing. Once set by the first I/O operation, orientation persists unless the stream is reopened with freopen(). Best practice is to choose one orientation and stick with it throughout your program.

## Full article

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

## Similar posts on daily.dev

- [an ambiguity in c89 which will never be fixed](https://daily.dev/posts/an-ambiguity-in-c89-which-will-never-be-fixed-2nx02scky) · Lobsters · 1 upvotes · 0 comments
- [Improvements to std::format in C\+\+26](https://daily.dev/posts/improvements-to-std-format-in-c-26-qfztpo4nx) · Marius Bancila · 0 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/what-is-stream-orientation-fwide--8crmjhifj)

```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":"What is stream orientation? (fwide)","url":"https://daily.dev/posts/what-is-stream-orientation-fwide--8crmjhifj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/what-is-stream-orientation-fwide--8crmjhifj"},"datePublished":"2026-01-20T18:46:46.160Z","dateModified":"2026-01-20T18:47:08.411Z","description":"Stream orientation in C determines whether a stream works with byte-oriented functions (like printf) or wide-character functions (like wprintf). Mixing these...","image":"https://i.ytimg.com/vi/HkuRvrn_AVI/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/HkuRvrn_AVI/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/what-is-stream-orientation-fwide--8crmjhifj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c","timeRequired":"PT6M","video":{"@type":"VideoObject","name":"What is stream orientation? (fwide)","description":"Stream orientation in C determines whether a stream works with byte-oriented functions (like printf) or wide-character functions (like wprintf). Mixing these...","thumbnailUrl":"https://i.ytimg.com/vi/HkuRvrn_AVI/sddefault.jpg","uploadDate":"2026-01-20T18:46:46.160Z","duration":"PT6M","url":"https://api.daily.dev/r/8CrMjHiFJ","embedUrl":"https://www.youtube.com/embed/HkuRvrn_AVI"}}
{"@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":"What is stream orientation? (fwide)"}]}
```

