Uploaded by A Sad Pony
1054x741 PNG 78 kBInterested in advertising on Derpibooru? Click here for information!
Help fund the $15 daily operational cost of Derpibooru - support us financially!
Description
I really like her
main()
! Tags
+-SH safe2266539 +-SH artist:drewklettke4 +-SH sweetie belle58639 +-SH pony1698898 +-SH unicorn581075 +-SH g42126120 +-SH c (language)17 +-SH female1907863 +-SH filly104884 +-SH gritted teeth20652 +-SH heart eyes32160 +-SH i really like her mane80 +-SH looking at you282630 +-SH microsoft windows954 +-SH notepad++1 +-SH programming141 +-SH pun9161 +-SH simple background638282 +-SH smiling431346 +-SH solo1504786 +-SH vector92638 +-SH white background177062
Source
not provided yet
Loading...
Loading...
(void)
, not()
, since an empty parameter list means unspecified parameters, not no parameters (unlike in C____).@K_A
In this case, there can’t be any precedence issue, because they’re simple constants.
int
, and produce a value of0
upon successful execution, or a non-zero value on error.@K_A
Ideally, you should just
# include <stdbool.h>
This not only defines constants for
true
andfalse
, but also defines abool
type, and is available even in freestanding environments.Make that:
#define TRUE (1)
#define FALSE (0)
I forgot to use parentheses to prevent operator precedence issues (subtle technical aspect of the C preprocessor from how macros do blind substitutions).
It is. Any non-zero value is interpreted as true in conditional branching (as is well reflected in the underlying processor instructions for branch-if-zero and branch-if-not-zero), and by convention the number 1 is used to represent truth as per common Boolean notation. You can also define via macros under the includes the integer values of
TRUE
andFALSE
to prevent “magic numbers,” though the 0/1 convention is imminently familiar with C programmers.#define TRUE 1
#define FALSE 0
I was actually wondering if the
while(1)
thing was a thing in C after he posted that. I know you can do something similar in Python with awhile True:
.while(1)
and would probably want a newline\n
at the end of the string. Furthermore, since no string formatting is actually done, you can also use theputs
function which appends the newline character for you.can’t really argue with that logic
while(1==1)
It’s:
#include <stdio.h>
main()
{
while(1=1)
{
printf(“Sweetie Bell is the best Cutie Mark Crusader!”);
}
}
And I really like programming humour.