#include<stdio.h> #include<string.h> int main(int a, int b) { int z; z = a>b? a:b; return z; } void demo68() { int a, b, c; int x,y; scanf("%d %d %d", &a, &b, &c); x = getMax(a, b); y = getMax(b, c); printf("%d", getMax(x,y)); } /* Main.c:4:5: warning: second argument of 'main' should be 'char **' [-Wmain] int main(int a, int b) ^ Main.c: In function 'demo68': Main.c:16:5: warning: implicit declaration of function 'getMax' [-Wimplicit-function-declaration] x = getMax(a, b); ^ /tmp/ccXuUcyl.o: In function `demo68': Main.c:(.text+0x52): undefined reference to `getMax' Main.c:(.text+0x69): undefined reference to `getMax' Main.c:(.text+0x80): undefined reference to `getMax' collect2: error: ld returned 1 exit status */ |
Double click to view unformatted code.