Source Code File 02-03_curlversion2.c

#include <stdio.h>
#include <curl/curl.h>

int main()
{
    curl_version_info_data *data;

    data = curl_version_info(CURLVERSION_NOW);
    printf("libcurl version %s\n", data->version);

    return(0);
}

Notes

* The value of the data->version variable is identical to the constant LIBCURL_VERSION, used in the source code file 02-01_curltest.c.

* A wide version of this code isn't available as none of the statements are split.