COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
Loading...
Searching...
No Matches
main3_4.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "3.h"
Include dependency graph for main3_4.c:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 5 of file main3_4.c.

5 {
6 int n = 1;
7 ListNode * listArray = (ListNode *)malloc(n * sizeof(ListNode));
8
9 ListNode * listPtr = &listArray[0];
10 listPtr->data = 1;
11 listPtr->next = NULL;
12
13 double average = findAverageCycleLength(listArray, n);
14
15 printf("%f\n", average);
16
17 free(listArray);
18}
double findAverageCycleLength(ListNode *arrPtr, int n)
Definition 3.c:4
Definition 3.h:4
int data
Definition 3.h:5
struct listNode * next
Definition 3.h:6

References listNode::data, findAverageCycleLength(), and listNode::next.

Here is the call graph for this function: