What is "foo" ?

In many examples (c++) i have seen a variable name commmonly used . That's " foo", "bar". Does foo symbolises any special meaning .

11/6/2019 1:33:43 AM


18 Answers

New Answer


foo and bar are just variable names created by someone with a sense of humour. They are thought to originate from the military slang FUBAR (F'd Up Beyond All Recognition) :) https://en.wikipedia.org/wiki/Foobar


Monical I totally agree. I much prefer the Monty Python variables spam, eggs and ham 😄


David Ashton I used to think it was 'F*d up beyond any repair' 😁


Any idea why they didn't call them fu and bar?


David Ashton I couldn't find the original one :/ But this is good enough: https://youtu.be/_bW4vEo1F4E Monty python humour is awesome. Haha 😁 Also: https://youtu.be/sAn7baRbhx4 😂 😂 😂


Ipang I guess there are a few variations (F'd/Fouled Up Beyond All Recognition/Any Repair/All Reason)




a very silly convention used to name functions. It should have ended a long time ago.


No it does not have any special meaning and these are just function calls.


Haris https://code.sololearn.com/W6M9RVIae5Le 😅


foo and bar are just demo name for variables and functions. Used to explain some logic or used as a example.



It's simple for example




- lqatqiy


Talk of making programming funny😂😂😂


good is just the name of variables ppl like to use when teaching that language just like python likes to use spam and eggs in it's lessons.


A problem has been detected and Windows has been shut down to prevent damage to your computer. The problem seems to be caused by the following file: xNtKrnl.exe SYSTEM_THREAD_EXCEPTION_NOT_HANDLED If this is the first time you've seen this stop error screen, restart your computer. If this screen appears again, follow these steps: Check to make sure any new hardware or software is properly installed. If this is a new installation, ask your hardware or software manufacturer for any Windows updates you might need. If problems continue, disable or remove any newly installed hardware or software. Disable BIOS memory options such as caching or shadowing. If you need to use safe mode to remove or disable components, restart your computer, press F8 to select Advanced Startup Options, and then select Safe Mode. Technical Information: *** STOP: 0x1000007e (0xffffffffc0000005, 0xfffff80002e55151, 0xfffff880009a99d8, 0xfffff880009a9230) *** xNtKrnl.exe - Address 0xfffff80002e55151 base at 0xfffff80002e0d000 Dat