The following C code uses the OpenMP parallel programming model to write the thread ID and number of threads to stdout using multiple threads.
#include <omp.h>
#include <stdio.h>
int main ()
{
#pragma omp parallel
{
// ID of the thread in the current team
...