The following is a C program to find out the maximum length allowed for a host name in the system We can make use of the function sysconf and pass the argument _SC_HOST_NAME_MAX
We need the header file unistd.h to use sysconf.
Save the program as get_max_hostname.c. Compile and execute the code.
We need the header file unistd.h to use sysconf.
Save the program as get_max_hostname.c. Compile and execute the code.
0 comments:
Post a Comment