-next-
Initialization

Better yet:

if (SDL_Init(SDL_INIT_AUDIO | SDL_INIT_VIDEO) < 0 )
  {
    fprintf(stderr, "Unable to init SDL: %s\n",
            SDL_GetError());
    exit(1);
  }

If SDL_Init() returns a negative value, an error occurred.

The function SDL_GetError() returns a string containing a message that you can print out, which explains the error.