It looks like you're not passing the low or high variables as arguments to the printf() call, on this line:
printf("low:%d high:%d\n")
If you provide the low and high variables as arguments to printf() then the expected output should be printed to the console, like so:
printf("low:%d high:%d\n", low, high);
The "print format" of "low:%d high:%d\n" being passed to the printf() function states that number values will be displayed for each occurrence of %d in the format string.
In order to specify the actual values that will be displayed for each occurrence of %d, additional arguments must be provided to the printf() function - one for each occurrence of %d:
printf("low:%d high:%d\n", low, /* <- the value of low will be printed after "low:" in output the string */ high /* <- the value of low will be printed after "low:" in output the string */ );
If these additional arguments are not provided, the program will still compile and run however, at run-time, the program will basically display what ever value is found at the memory locations where it expected to find values for each of the %d occurrences.
For more information on printf(), you might like to see this documentation - hope this helps!
highis likely to beelev[n-1](assuming n>0 andelev[]is sorted)