12 lines
216 B
C
12 lines
216 B
C
|
|
#include <stdio.h>
|
|
#include <unistd.h> /* sysconf() */
|
|
|
|
int main(int argc, char * argv[])
|
|
{
|
|
int nprocs = sysconf(_SC_NPROCESSORS_CONF);
|
|
|
|
printf("Number of processors: %d\n", nprocs);
|
|
return 0;
|
|
}
|