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> | |
// this is INCREDIBLY OBVIOUS so please stop being stupid. | |
int obvious(int a[], int idx) | |
{ | |
return a[idx]; | |
} | |
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> | |
#include <errno.h> | |
#include <string.h> | |
void print_spaces(int spaces) | |
{ | |
while (spaces-- > 0) | |
putchar(' '); | |
} |
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) | |
{ | |
printf("hello, world!\n"); | |
} | |
/* end of thingamajig. */ |
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 <errno.h> | |
#include <string.h> | |
void print_spaces(int spaces) | |
{ | |
while (spaces-- > 0) | |
putchar(' '); | |
} |
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
/* Copyright (C) 2016 Ryan Klingler | |
polymorphism.c : Polymorphism in C | |
A simple example of experimenting with polymorphism in C, | |
mainly to prove it's possible. */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef void *Object; |