Skip to content

Instantly share code, notes, and snippets.

@98chimp
Created March 12, 2015 07:00
Show Gist options
  • Select an option

  • Save 98chimp/96eb3f3a3a0e295fa2d7 to your computer and use it in GitHub Desktop.

Select an option

Save 98chimp/96eb3f3a3a0e295fa2d7 to your computer and use it in GitHub Desktop.

Revisions

  1. 98chimp created this gist Mar 12, 2015.
    26 changes: 26 additions & 0 deletions Q3 & Q4
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    //
    // temp.c
    // Adventure Game
    //
    // Created by Shahin on 2015-03-11.
    // Copyright (c) 2015 98% Chimp. All rights reserved.
    //

    #include <stdio.h>

    // Q3

    int my_strlen(char *string) {
    int length = 0;
    while (string[length] != '\0') {
    length++;
    }
    return length;
    }


    // Q4

    int (*someFunc)(char*, char*);

    // this function takes two pointer input types and outputs an integer.