Jim's
Tutorials

Spring 2018
course
site
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void printKids(char *kids[], int length){
  int i;
  for (i=0;i<length;i++){
    printf("%s \n", kids[i]);
  }
}

int main(){
  char *kids[] = {"Option 1", "Option 2"};
  int length = 2;
  printKids(kids, length);
  return 0;
} 
node addChild(node person, char *title[], int amount){
  int i;
  for (i=0;i<amount;i++){
    node child = newNode(title[i]);
    person->children[i] = child;
    person->children[i]->father = person;
    person->children[i]->mother = person->spouse;
  }
  person->child_amount += amount;
}
void addChild(node father, node child){
  father->children[father->child_amount] = child;
  child->father = father;
  child->mother = father->spouse;
  father->child_amount = father->child_amount + 1;
}
https://cs.marlboro.college /cours /spring2018 /jims_tutorials /web_tech /c_may2
last modified Fri April 19 2024 7:18 am

attachments [paper clip]

  last modified size
TXT binary-heap.c Fri Apr 19 2024 07:18 am 3.5K
TXT family-tree.c Fri Apr 19 2024 07:18 am 2.7K
TXT passing-char-string.c Fri Apr 19 2024 07:18 am 1.1K