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> | |
typedef int* intPtr; | |
typedef float (*fPtr) (float, float); | |
float plus(float a, float b){return a+b;} | |
float minus(float a, float b){return a-b;} | |
float multiply(float a, float b){return a*b;} | |
float divide(float a, float b){return a/b;} |
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
// taken from http://beej.us/guide/bgc/output/html/multipage/morestuff.html#pt2pt | |
#include <stdio.h> | |
#include <stdlib.h> | |
void get_string(int a, char **s) | |
{ | |
printf("s in get_string is : %p\n", s); | |
switch(a) | |
{ | |
case 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
//taken from http://stackoverflow.com/questions/894604/passing-dynamically-allocated-integer-arrays-in-c | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define ELEMENTS 5 | |
/* |
NewerOlder