Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

getpgmname - Query program name

&pagelevel(4)&pagelevel

Definition

#include <stdlib.h>

char *getpgmname(void);

getpgmname returns the name of the calling program. The result corresponds to argv[0]
of the main function.

Return val.

Pointer to the program name.

Example

#include <stdio.h>
#include <stdlib.h>
int main(void)
{
  printf("Example showing the use of getpgmname():");
  printf("Program name = %s\n", getpgmname());  return 0;
}