Follow TV Tropes

Following

History MediaNotes / TheCLanguage

Go To

OR

Added: 616

Changed: 2710

Removed: 1354

Is there an issue? Send a MessageReason:
None


C was co-created by Dennis Ritchie and Ken Thompson to use to help make a port of UsefulNotes/{{UNIX}}. Thompson intended to write UNIX in BCPL, however, since he didn't have the official description or documentation, he accidentally developed a much simpler and less wordy version now known as B. Ritchie then further improved B, which resulted in creating a new language, C.

C was soon becoming popular and was implemented on a wide variety of machines during the late 70s and 80s. This popularity fueled the need for standardization, and standardized it was. C18 is, and will be the current standard until 2021 when the community votes again.

%%!!Influence on Other Languages

%%This triggered a famous {{Snowclone}} in computing, with C's own successor being dubbed "C++" as a pun, after a command in C to increase a number by one. C++'s own successor would ''then'' be named "C#", and then all bets were off, with languages like C[=--=], D, F#, J#, and R.

to:

C was co-created by Dennis Ritchie and Ken Thompson to use to help make a port of UsefulNotes/{{UNIX}}. Thompson originally intended to write UNIX in BCPL, [[https://en.wikipedia.org/wiki/BCPL BCPL]]; however, since he didn't have the official description or documentation, he accidentally developed a much simpler and less wordy version now known as B.[[https://en.wikipedia.org/wiki/B_(programming_language) B]]. Ritchie then further improved B, which resulted in creating a new language, C. \n\nC was soon becoming popular and was implemented on a wide variety of machines during [[note]]This became the late 70s and 80s. This popularity fueled the need for standardization, and standardized it was. C18 is, and will be the current standard until 2021 when the community votes again.

%%!!Influence on Other Languages

%%This triggered
start of a famous {{Snowclone}} in computing, with C's own successor being dubbed "C++" as a pun, after a command in C to increase a number by one. C++'s own successor would ''then'' be named "C#", and then all bets were off, with languages like C[=--=], D, F#, J#, and R.
R.[[/note]]

C gradually became popular and was implemented on a wide variety of machines during the late 70s and 80s. This popularity fueled the need for standardization, which happened for the first time in 1989 and most recently in 2018. C17 is, and will be the current standard until 2023 when the community votes again.



C's speed and precision made it a popular choice for video game programming. Though C++ has mostly supplanted C in game programming now, many of the great games of yesteryear were written in C, especially during the '90s heyday of computer gaming. C's simple power allowed it to get the action moving at a lightning-pace, which coincided nicely with the increasing availability of sound cards and VGA graphics.

to:

C, sometimes alongside its close sibling C++, remains the bedrock of the UsefulNotes/{{Unix}} (and by extension its descendants, including UsefulNotes/MacOS and Linux and all ''their'' descendants) and UsefulNotes/MicrosoftWindows {{UsefulNotes/operating system}}s to this day. C and Unix in particular are so intertwined that C compilers on non-Unix systems often include tools to duplicate as much of a Unix environment as possible, including make and even Unix-like shells.

%%As Unix's popularity grew in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/{{Python}}, MATLAB, R, Mathematica and C++.

C's speed and precision also made it a popular choice for video game programming. Though C++ has mostly supplanted C in game programming now, many of the great games of yesteryear were written in C, especially during the '90s heyday of computer gaming. C's simple power allowed it to get the action moving at a lightning-pace, which coincided nicely with the increasing availability of sound cards and VGA graphics.



As Unix's popularity grew in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/{{Python}}, MATLAB, R, Mathematica and C++. C and Unix are so intertwined that C compilers on non-Unix systems often include tools to duplicate as much of a Unix environment as possible, including make and even Unix-like shells.

With the advent of higher level and safer languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost and direct hardware access of low-level code have graduated to its descendants like C# or Java or languages like UsefulNotes/{{Rust}} or Go, scripting languages like Perl, UsefulNotes/{{Ruby}} or UsefulNotes/{{Python}}, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.

to:

As Unix's popularity grew in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/{{Python}}, MATLAB, R, Mathematica and C++. C and Unix are so intertwined that C compilers on non-Unix systems often include tools to duplicate as much of a Unix environment as possible, including make and even Unix-like shells.

With the advent of higher level and safer languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost and direct hardware access of low-level code have graduated to one of its higher levels: its direct descendants like C# or Java or Java; languages like UsefulNotes/{{Rust}} or Go, Go; scripting languages like Perl, UsefulNotes/{{Ruby}} UsefulNotes/{{Ruby}}, or UsefulNotes/{{Python}}, UsefulNotes/{{Python}}; or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to raw C coding.



C came about at the tail-end of this period, and in many ways it serves as a bridge between these languages and newer ones. It's old enough that "pointers", a data type which allow a program to directly manipulate memory addresses, are a key feature, whereas most newer languages abstract that away and keep memory manipulation completely under the hood. This functionality is essential for operating system programming (as an OS is by definition something that manages your hardware for you), but directly manipulating memory is a good way for someone who doesn't know what they're doing to [[DarthWiki/IdiotProgramming shoot themselves in the foot]], and is often a source of {{Game Breaking Bug}}s.

to:

C came about at the tail-end of this period, and in many ways it serves as a bridge between these languages and newer ones. It's old enough that "pointers", a data type which allow a program to directly manipulate memory addresses, are a key feature, whereas most newer languages abstract that away and keep memory manipulation completely under the hood. This functionality is essential for operating system programming (as an OS operating system is by definition something that manages your hardware for you), but directly manipulating memory is a good way for someone who doesn't know what they're doing to [[DarthWiki/IdiotProgramming shoot themselves in the foot]], and is often a source of {{Game Breaking Bug}}s.



    [[teal:printf]][[gray:(]][[blue:"]][[teal:%d\n]][[blue:"]][[gray:, a+b);]]\\

to:

    [[teal:printf]][[gray:(]][[blue:"]][[teal:%d\n]][[blue:"]][[gray:, a+b);]]\\a + b);]]\\



    [[teal:printf]][[gray:(]][[blue:"]][[teal:%d\n]][[blue:"]][[gray:, b+c);]]\\

to:

    [[teal:printf]][[gray:(]][[blue:"]][[teal:%d\n]][[blue:"]][[gray:, b+c);]]\\b + c);]]\\



    [[teal:printf]][[gray:(]][[blue:"]][[teal:%s\n]][[blue:"]][[gray:, b+c);]]\\

to:

    [[teal:printf]][[gray:(]][[blue:"]][[teal:%s\n]][[blue:"]][[gray:, b+c);]]\\b + c);]]\\



    [[teal:printf]][[gray:(]][[blue:"Hello and ]][[teal:%s]][[blue:"]][[gray:,c);]]\\

to:

    [[teal:printf]][[gray:(]][[blue:"Hello and ]][[teal:%s]][[blue:"]][[gray:,c);]]\\]][[teal:%s]][[blue:"]][[gray:, c);]]\\



This is where C trusting the programmer really comes in. C won't throw an error if you try to add a number and a string [[note]](well, technically a char array)[[/note]] together, it will cast it based on the format specifier used [=(%d, %s, etc)=]. Meaning the string will convert to it's number and then add b.

to:

This is where C trusting the programmer really comes in. into play (and possibly back to bite them). C won't will not throw an error if you try to add a number and a string [[note]](well, technically a char array)[[/note]] together, together; instead, it will cast it based on the format specifier used provided [=(%d, %s, etc)=]. Meaning the string "c" will convert be converted to it's number its numerical equivalent and then add added to b.



    [[purple:for]][[gray:(]][[purple:int]] [[gray:i]]=[[blue:0]][[gray:;i]]<[[blue:10]][[gray:;i]]++[[gray:){]]\\

to:

    [[purple:for]][[gray:(]][[purple:int]] [[gray:i]]=[[blue:0]][[gray:;i]]<[[blue:10]][[gray:;i]]++[[gray:){]]\\    [[purple:for]] [[gray:(]][[purple:int]] [[gray:i]] = [[blue:0]][[gray:; i]] < [[blue:10]][[gray:; i]]++[[gray:) {]]\\



Outputs numbers 0 thru 9. Pretty standard [[ShapedLikeItself C-like]] for loop.

to:

Outputs numbers 0 thru 9. Pretty standard [[ShapedLikeItself C-like]] This three-statement syntax for loop.a for loop originated from C's predecessor B, but became widely known and imitated as a "C-like for loop" due to C's popularity.



* ''Pokémon [[UsefulNotes/GameBoyAdvance Generation III]][[UsefulNotes/NintendoDS , IV and V]] main series games. ''[[labelnote:List of Games]][[VideoGame/PokemonRubyAndSapphire Ruby, Sapphire & Emerald]], [[VideoGame/PokemonRedAndBlue Fire Red & Leaf Green]], [[VideoGame/PokemonDiamondAndPearl Diamond, Pearl & Platinum]], [[VideoGame/PokemonGoldAndSilver HeartGold & SoulSilver]], [[VideoGame/PokemonBlackAndWhite Black & White]], [[VideoGame/PokemonBlack2AndWhite2 Black 2 & White 2]].[[/labelnote]]

to:

* ''Pokémon ''Franchise/{{Pokemon}} [[UsefulNotes/GameBoyAdvance Generation III]][[UsefulNotes/NintendoDS , III,]] [[UsefulNotes/NintendoDS IV and V]] main series games. ''[[labelnote:List of Games]][[VideoGame/PokemonRubyAndSapphire Ruby, Sapphire & Emerald]], [[VideoGame/PokemonRedAndBlue Fire Red & Leaf Green]], [[VideoGame/PokemonDiamondAndPearl Diamond, Pearl & Platinum]], [[VideoGame/PokemonGoldAndSilver HeartGold & SoulSilver]], [[VideoGame/PokemonBlackAndWhite Black & White]], [[VideoGame/PokemonBlack2AndWhite2 Black 2 & White 2]].[[/labelnote]]
Is there an issue? Send a MessageReason:
None

Added DiffLines:

* [[https://floppy.foone.org/w/BRender The [=BRender=] engine]], which powered ''VideoGame/{{Carmageddon}}'', ''VideoGame/{{Croc}}'', and ''Doctor Who: Destiny of the Doctors''
Is there an issue? Send a MessageReason:
Added Pokémon Games

Added DiffLines:

* ''Pokémon [[UsefulNotes/GameBoyAdvance Generation III]][[UsefulNotes/NintendoDS , IV and V]] main series games. ''[[labelnote:List of Games]][[VideoGame/PokemonRubyAndSapphire Ruby, Sapphire & Emerald]], [[VideoGame/PokemonRedAndBlue Fire Red & Leaf Green]], [[VideoGame/PokemonDiamondAndPearl Diamond, Pearl & Platinum]], [[VideoGame/PokemonGoldAndSilver HeartGold & SoulSilver]], [[VideoGame/PokemonBlackAndWhite Black & White]], [[VideoGame/PokemonBlack2AndWhite2 Black 2 & White 2]].[[/labelnote]]
Is there an issue? Send a MessageReason:
None


With the advent of higher level and safer languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost of low-level code have graduated to its descendants like C# or Java or languages like UsefulNotes/{{Rust}} or Go, scripting languages like Perl, UsefulNotes/{{Ruby}} or UsefulNotes/{{Python}}, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.

to:

With the advent of higher level and safer languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost and direct hardware access of low-level code have graduated to its descendants like C# or Java or languages like UsefulNotes/{{Rust}} or Go, scripting languages like Perl, UsefulNotes/{{Ruby}} or UsefulNotes/{{Python}}, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.
Is there an issue? Send a MessageReason:
None


* ''VideoGame/DukeNukem3D'' The source code is out there, but be warned: it is an EldritchAbomination that [[GoMadFromTheRevelation makes all who gaze upon it want to tear their eyes out in horror]].

to:

* ''VideoGame/DukeNukem3D'' The ''VideoGame/DukeNukem3D''[[note]]The source code is out there, but be warned: it is an EldritchAbomination that [[GoMadFromTheRevelation makes all who gaze upon it want to tear their eyes out in horror]].[[/note]]
Is there an issue? Send a MessageReason:
None

Added DiffLines:

* ''VideoGame/TheLegendOfZeldaOcarinaOfTime''[[note]]Like ''Super Mario 64'' before it, a decompilation project is currently underway[[/note]]
Is there an issue? Send a MessageReason:
None


* ''Videogame/SuperMario64''[[note]]Not released as open-source by Nintendo, but fans managed to decompile working C source code from the ROM in 2019[[/note]]

to:

* ''Videogame/SuperMario64''[[note]]Not released as open-source by Nintendo, but fans managed to decompile reverse-engineer working C source code from the ROM in 2019[[/note]]
Is there an issue? Send a MessageReason:
None


* ''Videogame/SuperMario64''

to:

* ''Videogame/SuperMario64''''Videogame/SuperMario64''[[note]]Not released as open-source by Nintendo, but fans managed to decompile working C source code from the ROM in 2019[[/note]]
Is there an issue? Send a MessageReason:
None


The resulting explosion of light and sound was the FirstPersonShooter boom: ''{{VideoGame/Doom}}'', ''[[{{VideoGame/Marathon}} Marathon 2]]'', ''{{VideoGame/Descent}}'', and ''VideoGame/DarkForces'' were all written in C, as were the first three ''{{VideoGame/Quake}}'' games, along with non-shooty games such as ''VideoGame/SimCity''. Since companies are under no obligation to release details about their source code, it's tough to say who's still using it, but Cryptic Studios has been known to use almost-entirely pure C in their games, such as ''VideoGame/CityOfHeroes'' and ''VideoGame/StarTrekOnline''.

to:

The resulting explosion of light and sound was the FirstPersonShooter boom: ''{{VideoGame/Doom}}'', ''[[{{VideoGame/Marathon}} Marathon 2]]'', ''{{VideoGame/Descent}}'', and ''VideoGame/DarkForces'' were all written in C, as were the first three ''{{VideoGame/Quake}}'' games, along with non-shooty games such as ''VideoGame/SimCity''. Since companies are under no obligation to release details about their source code, it's tough to say who's still using it, but Cryptic Studios Creator/CrypticStudios has been known to use almost-entirely pure C in their games, such as ''VideoGame/CityOfHeroes'' and ''VideoGame/StarTrekOnline''.
Is there an issue? Send a MessageReason:
None


As Unix's popularity grew in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/{{Python}}, MATLAB, R, Mathematica and C++. C and Unix are so intertwined that C compilers on non-Unix systems often include tools to duplicate as much of a Unix-like environment as possible, including make and even Unix-like shells.

to:

As Unix's popularity grew in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/{{Python}}, MATLAB, R, Mathematica and C++. C and Unix are so intertwined that C compilers on non-Unix systems often include tools to duplicate as much of a Unix-like Unix environment as possible, including make and even Unix-like shells.
Is there an issue? Send a MessageReason:
None


As Unix's popularity grew in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/{{Python}}, MATLAB, R, Mathematica and C++.

to:

As Unix's popularity grew in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/{{Python}}, MATLAB, R, Mathematica and C++.
C++. C and Unix are so intertwined that C compilers on non-Unix systems often include tools to duplicate as much of a Unix-like environment as possible, including make and even Unix-like shells.
Is there an issue? Send a MessageReason:
None


As Unix became popular in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/{{Python}}, MATLAB, R, Mathematica and C++.

to:

As Unix became popular Unix's popularity grew in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/{{Python}}, MATLAB, R, Mathematica and C++.
Is there an issue? Send a MessageReason:
None


As Unix became popular in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/Python, MATLAB, R, Mathematica and C++.

to:

As Unix became popular in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/Python, UsefulNotes/{{Python}}, MATLAB, R, Mathematica and C++.

Added: 1015

Changed: 1011

Removed: 187

Is there an issue? Send a MessageReason:
None


As Unix became popular in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/Python, MATLAB, R and Mathematica.



With the advent of higher level and safer languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost of low-level code have graduated to its descendants like C# or Java or languages like UsefulNotes/{{Rust}}, scripting languages like Perl, UsefulNotes/{{Ruby}} or UsefulNotes/{{Python}}, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.

to:

As Unix became popular in academia, C displaced Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/Python, MATLAB, R, Mathematica and C++.

With the advent of higher level and safer languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost of low-level code have graduated to its descendants like C# or Java or languages like UsefulNotes/{{Rust}}, UsefulNotes/{{Rust}} or Go, scripting languages like Perl, UsefulNotes/{{Ruby}} or UsefulNotes/{{Python}}, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.
Is there an issue? Send a MessageReason:
None


As Unix became popular in academia, C displaced FORTRAN as the language of choice for scientific computing, before being itself displaced by UsefulNotes/Python, MATLAB, R and Mathematica.

to:

As Unix became popular in academia, C displaced FORTRAN Fortran as the language of choice for scientific computing, before being itself displaced by UsefulNotes/Python, MATLAB, R and Mathematica.
Is there an issue? Send a MessageReason:
None

Added DiffLines:

As Unix became popular in academia, C displaced FORTRAN as the language of choice for scientific computing, before being itself displaced by UsefulNotes/Python, MATLAB, R and Mathematica.
Is there an issue? Send a MessageReason:
None


With the advent of higher level and safer languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost of low-level code have graduated to its descendants like C# or Java or languages like UsefulNotes/{{Rust}}, scripting languages like Perl, Ruby or UsefulNotes/Python, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.

to:

With the advent of higher level and safer languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost of low-level code have graduated to its descendants like C# or Java or languages like UsefulNotes/{{Rust}}, scripting languages like Perl, Ruby UsefulNotes/{{Ruby}} or UsefulNotes/Python, UsefulNotes/{{Python}}, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.
Is there an issue? Send a MessageReason:
None


With the advent of higher level and safer languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost of low-level code have graduated to its descendants like C# or Java or langauges like UsefulNotes/{{Rust}}, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.

to:

With the advent of higher level and safer languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost of low-level code have graduated to its descendants like C# or Java or langauges languages like UsefulNotes/{{Rust}}, scripting languages like Perl, Ruby or UsefulNotes/Python, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.
Is there an issue? Send a MessageReason:
None


C is an [[https://en.wikipedia.org/wiki/Imperative_programming Imperative]], [[https://en.wikipedia.org/wiki/Type_system#STATIC Statically-Typed]], [[https://en.wikipedia.org/wiki/Procedural_programming Procedural]] UsefulNotes/ProgrammingLanguage. It's often considered the mother of modern programming languages, to the point where most non-specialized new languages are either refinements on its strengths or attempts to avoid breaking keyboards over its shortcomings. Or, more often, both. This language was developed at a time when computing was done on mainframes by computer black-belts, and it does not hold your hand.

to:

C is an [[https://en.wikipedia.org/wiki/Imperative_programming Imperative]], [[https://en.wikipedia.org/wiki/Type_system#STATIC Statically-Typed]], [[https://en.wikipedia.org/wiki/Procedural_programming Procedural]] UsefulNotes/ProgrammingLanguage. It's often considered the mother of modern programming languages, to the point where most non-specialized new languages are either refinements on its strengths or attempts to avoid breaking keyboards over its shortcomings. Or, more often, both. This language language, like the UsefulNotes/{{Unix}} system also created at Bell Labs, was developed at a time when computing was done on mainframes by computer black-belts, and it does not hold your hand.
Is there an issue? Send a MessageReason:
None


C was co-created by Dennis Ritchie and Ken Thompson to use to help make a port of UsefulNotes/UNIX. Thompson intended to write UNIX in BCPL, however, since he didn't have the official description or documentation, he accidentally developed a much simpler and less wordy version now known as B. Ritchie then further improved B, which resulted in creating a new language, C.

to:

C was co-created by Dennis Ritchie and Ken Thompson to use to help make a port of UsefulNotes/UNIX.UsefulNotes/{{UNIX}}. Thompson intended to write UNIX in BCPL, however, since he didn't have the official description or documentation, he accidentally developed a much simpler and less wordy version now known as B. Ritchie then further improved B, which resulted in creating a new language, C.

Added: 587

Changed: 708

Is there an issue? Send a MessageReason:
None


C's roots can be traced all the way back to FORTRAN, but the important ancestors are a language called CPL (Combined Programming Language) and its increasingly simpler, modified descendants known as BCPL (Basic Combined Programming Language) and B, the last from which the name "C" was derived. This triggered a famous {{Snowclone}} in computing, with C's own successor being dubbed "C++" as a pun, after a command in C to increase a number by one. C++'s own successor would ''then'' be named "C#", and then all bets were off, with languages like C[=--=], D, F#, J#, and R.

to:

C's roots can be traced all C was co-created by Dennis Ritchie and Ken Thompson to use to help make a port of UsefulNotes/UNIX. Thompson intended to write UNIX in BCPL, however, since he didn't have the way back to FORTRAN, but the important ancestors are official description or documentation, he accidentally developed a language called CPL (Combined Programming Language) much simpler and its increasingly simpler, modified descendants less wordy version now known as BCPL (Basic Combined Programming Language) and B. Ritchie then further improved B, the last from which resulted in creating a new language, C.

C was soon becoming popular and was implemented on a wide variety of machines during
the name "C" was derived. late 70s and 80s. This popularity fueled the need for standardization, and standardized it was. C18 is, and will be the current standard until 2021 when the community votes again.

%%!!Influence on Other Languages

%%This
triggered a famous {{Snowclone}} in computing, with C's own successor being dubbed "C++" as a pun, after a command in C to increase a number by one. C++'s own successor would ''then'' be named "C#", and then all bets were off, with languages like C[=--=], D, F#, J#, and R.
R.

!!Usage
Is there an issue? Send a MessageReason:
None


C is an [[https://en.wikipedia.org/wiki/Imperative_programming imperative]], [[https://en.wikipedia.org/wiki/Type_system#STATIC statically-typed]], [[https://en.wikipedia.org/wiki/Procedural_programming procedural]] UsefulNotes/ProgrammingLanguage. It's often considered the mother of modern programming languages, to the point where most non-specialized new languages are either refinements on its strengths or attempts to avoid breaking keyboards over its shortcomings. Or, more often, both. This language was developed at a time when computing was done on mainframes by computer black-belts, and it does not hold your hand.

to:

C is an [[https://en.wikipedia.org/wiki/Imperative_programming imperative]], Imperative]], [[https://en.wikipedia.org/wiki/Type_system#STATIC statically-typed]], Statically-Typed]], [[https://en.wikipedia.org/wiki/Procedural_programming procedural]] Procedural]] UsefulNotes/ProgrammingLanguage. It's often considered the mother of modern programming languages, to the point where most non-specialized new languages are either refinements on its strengths or attempts to avoid breaking keyboards over its shortcomings. Or, more often, both. This language was developed at a time when computing was done on mainframes by computer black-belts, and it does not hold your hand.



!!Just Following Procedure

Though C is broad enough to be used for many purposes, it is technically known as a "procedural" language. Any C code not designed to induce a headache is broken up into small chunks of self-contained code. The program calls procedures (known in C as functions, but not to be confused with functional ''programming'', which is something else entirely) which perform a smaller subtask and then return control to the part of the code that called it.

Hence, chunks of code can be reused many, many times according to the control flow (the logic built into a program), as opposed to older "batch" programs which would be fed input and spit the results back out at you. C's modular nature comes from its role as a systems language designed to program {{UsefulNotes/UNIX}} at [=AT&T's=] Bell Labs, and to this day it remains a popular language for operating systems. Both UsefulNotes/MicrosoftWindows and the UsefulNotes/{{Linux}} kernel are written in C, and [[UsefulNotes/MacOS OSX]] is written in a variant called "Objective-C".

When discussing C, it's often rolled up with C++ to become "C/C++". Almost all valid C code will run with no problems inside C++, since C++ was designed to wrap around C like a matryoshka doll.[[note]]C++ tends to be more pedantic with its casting, requiring an explicit cast where C would cast implicitly, and reserves more words as keywords which breaks any code which uses them as names. It also maintains less compatibility with older pre-1989 C code. C++ compilers (such as Microsoft Visual C++) tend to include C modes/compilers as standard, though.[[/note]] However, it's something of a BerserkButton for some programmers, who say C++ has its own entirely different coding practices, since C++ is ''object-oriented'' rather than procedural. In C, things such as the player's health, location, and weapon are treated as individual datum by the code, which can be changed by any procedure that is directed to change it. In C++ however, that data is instead (at least supposed to be) part of an object, which is concealed from the rest of the code. In practice, however, due to many codebases starting out as C before being upgraded to C++ at some point in their history, it's common to see projects that mix both languages' conventions and coding styles.

to:

!!Just %%!!Just Following Procedure

Though %%Though C is broad enough to be used for many purposes, it is technically known as a "procedural" language. Any C code not designed to induce a headache is broken up into small chunks of self-contained code. The program calls procedures (known in C as functions, but not to be confused with functional ''programming'', which is something else entirely) which perform a smaller subtask and then return control to the part of the code that called it.

Hence, %%Hence, chunks of code can be reused many, many times according to the control flow (the logic built into a program), as opposed to older "batch" programs which would be fed input and spit the results back out at you. C's modular nature comes from its role as a systems language designed to program {{UsefulNotes/UNIX}} at [=AT&T's=] Bell Labs, and to this day it remains a popular language for operating systems. Both UsefulNotes/MicrosoftWindows and the UsefulNotes/{{Linux}} kernel are written in C, and [[UsefulNotes/MacOS OSX]] is written in a variant called "Objective-C".

When %%When discussing C, it's often rolled up with C++ to become "C/C++". Almost all valid C code will run with no problems inside C++, since C++ was designed to wrap around C like a matryoshka doll.[[note]]C++ tends to be more pedantic with its casting, requiring an explicit cast where C would cast implicitly, and reserves more words as keywords which breaks any code which uses them as names. It also maintains less compatibility with older pre-1989 C code. C++ compilers (such as Microsoft Visual C++) tend to include C modes/compilers as standard, though.[[/note]] However, it's something of a BerserkButton for some programmers, who say C++ has its own entirely different coding practices, since C++ is ''object-oriented'' rather than procedural. In C, things such as the player's health, location, and weapon are treated as individual datum by the code, which can be changed by any procedure that is directed to change it. In C++ however, that data is instead (at least supposed to be) part of an object, which is concealed from the rest of the code. In practice, however, due to many codebases starting out as C before being upgraded to C++ at some point in their history, it's common to see projects that mix both languages' conventions and coding styles.
Is there an issue? Send a MessageReason:
None


With the advent of higher level languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost of low-level code have graduated to its descendants like C# or Java, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.

to:

With the advent of higher level and safer languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost of low-level code have graduated to its descendants like C# or Java, Java or langauges like UsefulNotes/{{Rust}}, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.

Added: 1901

Changed: 11

Removed: 3118

Is there an issue? Send a MessageReason:
None


!!Origin

to:

!!Origin
!!History



C's speed and precision made it a popular choice for video game programming. Though C++ has mostly supplanted C in game programming now, many of the great games of yesteryear were written in C, especially during the '90s heyday of computer gaming. C's simple power allowed it to get the action moving at a lightning-pace, which coincided nicely with the increasing availability of sound cards and VGA graphics.

The resulting explosion of light and sound was the FirstPersonShooter boom: ''{{VideoGame/Doom}}'', ''[[{{VideoGame/Marathon}} Marathon 2]]'', ''{{VideoGame/Descent}}'', and ''VideoGame/DarkForces'' were all written in C, as were the first three ''{{VideoGame/Quake}}'' games, along with non-shooty games such as ''VideoGame/SimCity''. Since companies are under no obligation to release details about their source code, it's tough to say who's still using it, but Cryptic Studios has been known to use almost-entirely pure C in their games, such as ''VideoGame/CityOfHeroes'' and ''VideoGame/StarTrekOnline''.

With the advent of higher level languages, however, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost of low-level code have graduated to its descendants like C# or Java, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.



!!Modern Times

With the advent of higher level languages, C started going the way of Latin. It's still considered essential for operating systems, hardware interfacing, and embedded systems (say, a thermostat or a pacemaker), but when it comes to applications, it's something of an elder statesman: it's generally accepted as an important pioneer, but it's often sidelined because of its antiquated methods, bare-bones nature, and propensity for bug-riddled coding. Many commercial programmers and businesses that don't have to work with preexisting C codebases or require the performance boost of low-level code have graduated to its descendants like C# or Java, or premade frameworks like [[https://en.wikipedia.org/wiki/Qt_(software) Qt]] (for applications) or UsefulNotes/{{Unity}} (for games). These are considered quicker to write code for and offer safer alternatives to C coding.

!!Doom and Boom

C's speed and precision made it a popular choice for video game programming. Though C++ has mostly supplanted C in game programming now, many of the great games of yesteryear were written in C, especially during the '90s heyday of computer gaming. C's simple power allowed it to get the action moving at a lightning-pace, which coincided nicely with the increasing availability of sound cards and VGA graphics.

The resulting explosion of light and sound was the FirstPersonShooter boom: ''{{VideoGame/Doom}}'', ''[[{{VideoGame/Marathon}} Marathon 2]]'', ''{{VideoGame/Descent}}'', and ''VideoGame/DarkForces'' were all written in C, as were the first three ''{{VideoGame/Quake}}'' games, along with non-shooty games such as ''VideoGame/SimCity''. Since companies are under no obligation to release details about their source code, it's tough to say who's still using it, but Cryptic Studios has been known to use almost-entirely pure C in their games, such as ''VideoGame/CityOfHeroes'' and ''VideoGame/StarTrekOnline''.

Even for game engines written in C++ or other languages, enormously popular libraries such as SDL (Simple [=DirectMedia=] Layer, which simplifies interfacing with operating systems) and UsefulNotes/OpenGL (the industry standard for 3D graphics) are written in C, meaning lots of function calls to underlying C code. The popular open source CGI software Blender is also built with a C core[[note]]with Python scripting and a touch of C++ for the physics[[/note]], so ''WesternAnimation/BigBuckBunny'', ''{{Film/Sintel}}'', and ''Film/TearsOfSteel'' were all modeled, animated, and rendered by C code.

Wherever graphics go, there the C programming language is. Although it's often paired with scripting languages or other toolkits, C remains a backbone of hardware intensive programs due to its ability to manipulate memory, interact with hardware, and run very quickly while doing both those things. That, coupled with its ubiquity in the lower-level architecture of modern information technology, ensures that C remains as vital as it has been for the past half-century. And it will ensure that C remains a vital tool for programmers to shoot themselves in the foot with for the foreseeable future.

Added: 75

Changed: 125

Removed: 28

Is there an issue? Send a MessageReason:
None


C is an [[https://en.wikipedia.org/wiki/Imperative_programming imperative]], [[https://en.wikipedia.org/wiki/Type_system#STATIC statically-typed]], [[https://en.wikipedia.org/wiki/Procedural_programming procedural]] UsefulNotes/ProgrammingLanguage. It's often considered the mother of modern programming languages, to the point where most non-specialized new languages are either refinements on its strengths or attempts to avoid breaking keyboards over its shortcomings. Or, more often, both. This language, like the UsefulNotes/{{Unix}} operating system it was designed for, was developed at a time when computing was done on mainframes by computer black-belts, and it does not hold your hand.

to:

C is an [[https://en.wikipedia.org/wiki/Imperative_programming imperative]], [[https://en.wikipedia.org/wiki/Type_system#STATIC statically-typed]], [[https://en.wikipedia.org/wiki/Procedural_programming procedural]] UsefulNotes/ProgrammingLanguage. It's often considered the mother of modern programming languages, to the point where most non-specialized new languages are either refinements on its strengths or attempts to avoid breaking keyboards over its shortcomings. Or, more often, both. This language, like the UsefulNotes/{{Unix}} operating system it was designed for, language was developed at a time when computing was done on mainframes by computer black-belts, and it does not hold your hand.
hand.

You can try C [[https://www.onlinegdb.com/online_c_compiler here]].

!!Origin



----

[[folder:Code Examples]]



%%https://www.onlinegdb.com/online_c_compiler

to:

%%https://www.onlinegdb.com/online_c_compiler
[[folder:Code Examples]]

Changed: 202

Removed: 483

Is there an issue? Send a MessageReason:
None


C is an [[https://en.wikipedia.org/wiki/Imperative_programming imperative]], [[https://en.wikipedia.org/wiki/Type_system#STATIC statically-typed]], [[https://en.wikipedia.org/wiki/Procedural_programming procedural]] UsefulNotes/ProgrammingLanguage. It's often considered the mother of modern programming languages, to the point where most non-specialized new languages are either refinements on its strengths or attempts to avoid breaking keyboards over its shortcomings. Or, more often, both.

Not to be confused with ''The C Programming Language'', the original specification manual written by the language's developers, Dennis Ritchie and Brian Kernighan, although some confusion will inevitably result, because diving into the C language ''will'' often led to GuideDangIt. This language, like the UsefulNotes/{{Unix}} operating system it was designed for, was developed at a time when computing was done on mainframes by computer black-belts, and it does not hold your hand.

to:

C is an [[https://en.wikipedia.org/wiki/Imperative_programming imperative]], [[https://en.wikipedia.org/wiki/Type_system#STATIC statically-typed]], [[https://en.wikipedia.org/wiki/Procedural_programming procedural]] UsefulNotes/ProgrammingLanguage. It's often considered the mother of modern programming languages, to the point where most non-specialized new languages are either refinements on its strengths or attempts to avoid breaking keyboards over its shortcomings. Or, more often, both. \n\nNot to be confused with ''The C Programming Language'', the original specification manual written by the language's developers, Dennis Ritchie and Brian Kernighan, although some confusion will inevitably result, because diving into the C language ''will'' often led to GuideDangIt. This language, like the UsefulNotes/{{Unix}} operating system it was designed for, was developed at a time when computing was done on mainframes by computer black-belts, and it does not hold your hand.
Is there an issue? Send a MessageReason:
None




to:

\nThis program outputs Hello World to the console. You must use double quotes.



    [[green://Outputs random data depending on the code below]]\\

to:

    [[green://Outputs random data the first string it finds depending on the code below]]\\



\\C rarely gives errors, but

to:

\\C rarely gives errors, but
\\
This is where C trusting the programmer really comes in. C won't throw an error if you try to add a number and a string [[note]](well, technically a char array)[[/note]] together, it will cast it based on the format specifier used [=(%d, %s, etc)=]. Meaning the string will convert to it's number and then add b.



Outputs numbers 0 thru 9.

to:

Outputs numbers 0 thru 9. Pretty standard [[ShapedLikeItself C-like]] for loop.

Added: 287

Changed: 324

Is there an issue? Send a MessageReason:
None


%https://www.onlinegdb.com/online_c_compiler

to:

%https://www.%%https://www.onlinegdb.com/online_c_compiler






    [[purple:int]] [[gray:b]] = [[blue:7]][[gray;]]\\

to:

    [[purple:int]] [[gray:b]] = [[blue:7]][[gray;]]\\[[blue:7]][[gray:;]]\\



    printf("%d\n", a+b);\\
    //Outputs 17\\
    printf("%d\n", b+c);\\
    //Outputs 4195995\\
    printf("%s\n", b+c);\\
    //Outputs random data depending on the code below\\
    printf("Hello and %s",c);\\
    //Outputs Hello and hi
    return 0;\\
}\\

to:

    printf("%d\n", a+b);\\
    //Outputs 17\\
    printf("%d\n", b+c);\\
    //Outputs 4195995\\
    printf("%s\n", b+c);\\
    //Outputs
    [[teal:printf]][[gray:(]][[blue:"]][[teal:%d\n]][[blue:"]][[gray:, a+b);]]\\
    [[green://Outputs 17]]\\
    [[teal:printf]][[gray:(]][[blue:"]][[teal:%d\n]][[blue:"]][[gray:, b+c);]]\\
    [[green://Outputs 4195995]]\\
    [[teal:printf]][[gray:(]][[blue:"]][[teal:%s\n]][[blue:"]][[gray:, b+c);]]\\
    [[green://Outputs
random data depending on the code below\\
    printf("Hello
below]]\\
    [[teal:printf]][[gray:(]][[blue:"Hello
and %s",c);\\
    //Outputs
]][[teal:%s]][[blue:"]][[gray:,c);]]\\
    [[green://Outputs
Hello and hi
    return 0;\\
}\\
hi]]\\
    [[purple:return]] [[blue:0]][[gray:;]]\\
[[gray:}]]\\




to:

\\C rarely gives errors, but



@@#include <stdio.h>\\

to:

@@#include <stdio.h>\\
@@[[purple:#include]] [[gray:<stdio.h>]]\\
[[purple:int]] [[gray:main() {]]\\
    [[purple:for]][[gray:(]][[purple:int]] [[gray:i]]=[[blue:0]][[gray:;i]]<[[blue:10]][[gray:;i]]++[[gray:){]]\\
[[teal:printf]][[gray:(]][[blue:"]][[teal:%d\n]][[blue:"]][[gray:, i);]]\\
    [[gray:}]]\\
    [[purple:return]] [[blue:0]][[gray:;]]\\
[[gray:}]]\\



\\
Outputs numbers 0 thru 9.



* ''VideoGame/DukeNukem3D'' The source code for Duke Nukem 3D is also out there, but be warned: it is an EldritchAbomination that [[GoMadFromTheRevelation makes all who gaze upon it want to tear their eyes out in horror]].

to:

* ''VideoGame/DukeNukem3D'' The source code for Duke Nukem 3D is also out there, but be warned: it is an EldritchAbomination that [[GoMadFromTheRevelation makes all who gaze upon it want to tear their eyes out in horror]].

Added: 106

Changed: 225

Is there an issue? Send a MessageReason:
None


%https://www.onlinegdb.com/online_c_compiler



@@[=#=]include <stdio.h>\\
int main() {\\
    printf("Hello World!");\\
    return 0;\\
}\\

to:

@@[=#=]include <stdio.h>\\
int main() {\\
    printf("Hello World!");\\
    return 0;\\
}\\
@@[[purple:#include]] [[gray:<stdio.h>]]\\
[[purple:int]] [[gray:main() {]]\\
    [[teal:printf]][[gray:(]][[blue:"Hello World!"]][[gray:);]]\\
    [[purple:return]] [[blue:0]][[gray:;]]\\
[[gray:}]]\\



@@#include <stdio.h>\\
int main() {\\
    int a = 10;\\
    int b = 7;\\
    char* c = "hi";\\

to:

@@#include <stdio.h>\\
int main() {\\
    int a
@@[[purple:#include]] [[gray:<stdio.h>]]\\
[[purple:int]] [[gray:main() {]]\\
    [[purple:int]] [[gray:a]]
= 10;\\
    int b
[[blue:10]][[gray:;]]\\
    [[purple:int]] [[gray:b]]
= 7;\\
    char* c
[[blue:7]][[gray;]]\\
    [[purple:char]]* [[gray:c]]
= "hi";\\[[blue:"hi"]][[gray:;]]\\



    //Outputs 4195902\\

to:

    //Outputs 4195902\\4195995\\


Added DiffLines:

    //Outputs Hello and hi


Added DiffLines:


!!!For Loops

@@#include <stdio.h>\\

@@
Is there an issue? Send a MessageReason:
None

Added DiffLines:

----

[[folder:Code Examples]]

[[hardline]]

!!!Hello C
@@[=#=]include <stdio.h>\\
int main() {\\
    printf("Hello World!");\\
    return 0;\\
}\\
@@
\\

!!!Variable Declaration and Concatenation

@@#include <stdio.h>\\
int main() {\\
    int a = 10;\\
    int b = 7;\\
    char* c = "hi";\\
    printf("%d\n", a+b);\\
    //Outputs 17\\
    printf("%d\n", b+c);\\
    //Outputs 4195902\\
    printf("%s\n", b+c);\\
    //Outputs random data depending on the code below\\
    printf("Hello and %s",c);\\
    return 0;\\
}\\
@@
[[/folder]]

Top