4

stdio.h is a header file from the C Standard Libraries, and their implementations are in the libc.a file, due to his common and extended use, this file is automatically linked by the compiler as if the -lc argument was especified on the compiler command like this: clang hello hello.c -lc On the other hand, the cs50 library is and external library created ...


3

You have declared an array called values. When you say 'values[middle]', it refers to the middle element of array. On the other hand, 'values' refers to the address of the beginning of that array. You are actually comparing address of array with the one of the element of the same array. I assume that you wanted to compare 'values[middle]' to the number you ...


1

The compiler command is make test (unless you want to supply all the switches for clang). Notice that make echos to the terminal the actual clang command it uses.


1

The variable a is declared as a single integer. In the line if (a > a[y+1]) this code attempts to compare a to an array of the same variable name. This presents two problems. First, two vars can't have the same name in C. Second, nowhere in the code is an array declared. So, this will never compile. I looked at the code on that link. It's unfortunate ...


1

I'm obviously new at this. The problem was that I was leaving a space between the ./ and the name of the file!


1

are you trying make greedy.c ? if yes, try this; make greedy


Only top voted, non community-wiki answers of a minimum length are eligible