Skip to content

Instantly share code, notes, and snippets.

View Silva97's full-sized avatar
🤔
Thinking, of course.

Luiz Felipe Silva Silva97

🤔
Thinking, of course.
View GitHub Profile
/********************
* Exemplo desenvolvido por Luiz Felipe
* Link do vídeo: https://youtu.be/wUrk9AK6ItY
********************/
#include <stdio.h>
char keyboard[BUFSIZ];
int main(){
#include <stdio.h>
int main(void)
{
fputs("Dia da semana(1~7): ", stdout);
printf("Nome do dia: %s\n",
((char [][16]){
"Domingo",
"Segunda",
#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"
@Silva97
Silva97 / 128bit-division.c
Last active September 30, 2019 21:34
Exemplo de divisão de um número de 128 bits
#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"
/* 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>
#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)
#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++)
/********************
* Exemplo por Luiz Felipe
* https://github.com/Silva97
********************/
#include <stdio.h>
#include <unistd.h>
#define FNAME "exemplo.dat"
#include <stdio.h>
#include <stdlib.h>
void triangle(int, int);
int main(int argc, char **argv)
{
triangle(atoi(argv[1]), 0); // 17
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int cmpfloat(const void *n1, const void *n2)
{
return *( (const float *) n1 ) > *( (const float *) n2 );
}
#define SIZE 3