This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************** | |
* Exemplo desenvolvido por Luiz Felipe | |
* Link do vídeo: https://youtu.be/wUrk9AK6ItY | |
********************/ | |
#include <stdio.h> | |
char keyboard[BUFSIZ]; | |
int main(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) | |
{ | |
fputs("Dia da semana(1~7): ", stdout); | |
printf("Nome do dia: %s\n", | |
((char [][16]){ | |
"Domingo", | |
"Segunda", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <inttypes.h> | |
uint32_t fib(int n) | |
{ | |
register uint32_t r = 0; | |
__asm__( | |
"mov $1, %%ebx\n\t" | |
".lp%=:\n\t" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <inttypes.h> | |
int asmdiv(uint64_t highq, uint64_t lowq, uint64_t divisor) | |
{ | |
uint64_t quotient; | |
uint64_t modulous; | |
__asm__ __volatile__ ( | |
"movq %[highq], %%rdx\n\t" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Just a simple crackme. | |
* For compile this crackme, download the CCS tool from: | |
* https://github.com/Silva97/cli-tools | |
* | |
* And run: | |
* $ gcc `./ccs crackme00.c` -o crackme00 | |
*/ | |
#include <stdio.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct example { | |
void (*add)(struct example *, int); | |
void (*show)(struct example *); | |
int number; | |
}; | |
void example_add(struct example *this, int n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#define ASIZE 4 | |
int main(void) | |
{ | |
// char *a[ASIZE]; | |
char **a = malloc(sizeof (char *) * ASIZE); | |
for (int i = 0; i < ASIZE; i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************** | |
* Exemplo por Luiz Felipe | |
* https://github.com/Silva97 | |
********************/ | |
#include <stdio.h> | |
#include <unistd.h> | |
#define FNAME "exemplo.dat" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
void triangle(int, int); | |
int main(int argc, char **argv) | |
{ | |
triangle(atoi(argv[1]), 0); // 17 | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int cmpfloat(const void *n1, const void *n2) | |
{ | |
return *( (const float *) n1 ) > *( (const float *) n2 ); | |
} | |
#define SIZE 3 |