Skip to content

Instantly share code, notes, and snippets.

@arthurmco
Last active April 28, 2017 16:05
Show Gist options
  • Save arthurmco/8b7efd35ec2c25d34d01ac1c30cf9588 to your computer and use it in GitHub Desktop.
Save arthurmco/8b7efd35ec2c25d34d01ac1c30cf9588 to your computer and use it in GitHub Desktop.
programa mentiroso e caluniador
#include <stdio.h>
const char* s[] = {"Mentiroso", "Caluniador"};
int mentira = 0x206520;
#define caluniador(x) x ^= 0x1
#define mentiroso(q,x) q[x]
#define MENTIROSO_E_CALUNIADOR() \
printf(mentiroso(s,m)); printf((char*)&mentira); caluniador(m)
#define CALUNIADOR_E_MENTIROSO() \
printf(mentiroso(s, m)); putchar(10); MENTIROSO_E_CALUNIADOR(); printf(mentiroso(s, m))
int main() {
int m = 0;
MENTIROSO_E_CALUNIADOR();
CALUNIADOR_E_MENTIROSO();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment