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 safe2264832 +-SH artist:drewklettke4 +-SH sweetie belle58612 +-SH pony1697018 +-SH unicorn580156 +-SH g42124530 +-SH c (language)17 +-SH female1906075 +-SH filly104750 +-SH gritted teeth20638 +-SH heart eyes32133 +-SH i really like her mane80 +-SH looking at you282258 +-SH microsoft windows954 +-SH notepad++1 +-SH programming141 +-SH pun9159 +-SH simple background637782 +-SH smiling430809 +-SH solo1503513 +-SH vector92581 +-SH white background176952
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.