Interview answers verified by specialists.

Find interview questions and answers on this website:

See right interview answers on 30 common job interview questions

How do you view the PATH?

Your C compiler library contains a function called getenv() that can retrieve any specified environment
variable. It has one argument, which is a pointer to a string containing the environment variable you want
to retrieve. It returns a pointer to the desired environment string on successful completion. If the function
cannot find your environment variable, it returns NULL.

The following example program shows how to obtain the PATH environment variable and print it on-screen:

#include <stdio.h>
#include <stdlib.h>
void main(void);
void main(void)
     char* env_string;
     env_string = getenv("PATH");
     if (env_string == (char*) NULL)
          printf("\nYou have no PATH!\n");
          printf("\nYour PATH is: %s\n", env_string);

Do you know that?

1 in 4 university students work online Next


Getting payments for Freelancers
1. Read how to register and get earned money

2. Open account within 5 minPayoneer sing up to get free $25