OpenSSL PBKDF2-HMAC-SHAx proof of concept
Things you did well on:


Looks like you weren't too rusty based on this code.  Looks very nice organizationally.
You return different values for different error conditions.


Things you could improve on:

Standards


Initialize i in your for loops.(C99)

for (unsigned int i = 0; i &lt; sizeof(digest); i++)



Syntax


Don't over-compact your code.


if(argc != 6){printf("Incorrect number of parameters.\n");return 2;};



Let it breathe a bit.

if(argc != 6)
{
    printf("Incorrect number of parameters.\n");
    return 2;
}

Use puts() instead of printf() when you aren't formatting a string.

puts("Incorrect number of parameters.");

You don't follow proper C naming conventions.


 char HexResult[2*outputbytes-1];



Either use camelCase, or snake_case with variable names.
Your indentation is a bit odd.


if (strcmp(argv[1],"SHA-512")==0)
  {
  PBKDF2_HMAC_SHA_512(pass, salt, iterations, outputbytes, HexResult);
  }



But that could be a copy-paste issue.


Commenting:


The only comments I see are a link to a Stack Overflow post, and a commented-out bit of old code.  Use more comments to explain what your code does, and how it accomplishes that/why it works.

Look at it as if a new developer was going to look at your code.  You should try to explain it so that he could understand it's basic function and how it works right away.  You might thank yourself when you return back to this project in the future, forgetting completely how it works. ;)