cout - what it stands for? [duplicate]
Asked Answered
P

2

17

Possible Duplicate:
What does the “c” mean in cout, cin, cerr and clog?

Can someone please explain to me what cout stands for?

Pickwickian answered 4/2, 2011 at 18:47 Comment(3)
Freedom, Apple Pie, and The American Way.Langlauf
Using streams for input formatting is a peccadillo since real men write their own parsers. Hence the input stream was originally called sin, but this conflicted with the stable isomorphic numerator in BCPL. So Stroustrup reluctantly changed the name to cin. Thus when he needed a name for the output formatting stream, he decided to call it cout. That joker.Mapp
@casablanca I don't 100% agree with your comment because I'm an example of a random user who googled this question and finally found the correct answer here.Getty
H
28

The "c" stands for character. By default, most systems have their standard output set to the console, where text messages are shown, although this can generally be redirected. The "c" is sometimes mistakenly attributed as "console."

The "out" stands for output

Horseback answered 4/2, 2011 at 18:49 Comment(5)
According to Bjarne Stroustrup: The "c" stands for "character" - www2.research.att.com/~bs/bs_faq2.html#coutScull
@ Michael, beat ya to the punch :pHorseback
bjarne says " The "c" stands for "character" because iostreams map values to and from byte (char) representations."Bartram
"beat ya to the punch" -- um, no. Your answer says that the "c" stands for "console", which is blatantly wrong. Saying that it "also" stands for "character" is nonsense -- it only stands for "character".Quietus
Thanks for the mature response and correction. I apologize for the unnecessary harshness of my previous comment.Quietus
H
-7

I'll hazard a guess...

Channel Out

Halogen answered 4/2, 2011 at 18:50 Comment(7)
In my defence, the book I have (Josuttis) refers to cout as "the standard output channel"Halogen
Throw out that book. cout stands for console or character output, which is by default is directed to standard output.California
StackOverflow is for answers, not guesses. The "c" stands for "character" (and not "console").Quietus
let's throw google away too. I asked "why is cout called cout" and it returned The identifier cout stands for common output.Antirrhinum
@JimBalter Why "Console" is false?Schnabel
It's false because it's not true. The 'c' stands for 'character'. See , e.g., programiz.com/cpp-programming/library-function/iostream/coutQuietus
"let's throw google away too" No, let's not. "it returned The identifier cout stands for common output" -- Google returns references, not answers. No reliable reference says "common" ... they all say "character", which is correct.Quietus

© 2022 - 2024 — McMap. All rights reserved.