Skip to content

Instantly share code, notes, and snippets.

@alexparkjw
alexparkjw / hello.c
Created April 11, 2020 02:24
gist test in c
#include <stdio.h>
#define echo(x) printf(#x":\t %s\n", x)
int main(void) {
char textHello[] = "Hello world";
echo(textHello);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <ncurses.h>
#define NofEL(x ) (sizeof(x ) / sizeof(*(x ) ) )
#define _ARR(a ) (a ), NofEL(a )
#define _CLEAR(w ) werase(w ); wrefresh(w )
#define __POS(p ) p.h, p.w, p.y, p.x
typedef struct Pos{ int h, w, y, x; }structPos;
void printMenu (WINDOW * winCur, int hl, const char *tm[], int n );
void printInsert(WINDOW * winCur, char *str, const char *type );
/*
nCr, nPr, 10C4=210, 10P4=5040, nCr=nPr/r!
*/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
void swap(void *vp1, void *vp2, int size) {