C > C on Unix
Program to get the GroupID ( GID ) information
Program to get the GroupID ( GID ) information #include
#include
#include
#include
int main() { gid_t gid; if ((gid = getgid()) < 0) { perror(" getgid error"); } else { printf(" The group id is : %d", gid); } if ((gid = getegid()) < 0) { perror(" getegid error"); } else { printf(" The effective group id is : %d", gid); } printf(" "); return(0); }
C Codes
Beginners
C on Unix
Code Snippets
Data Structures
File Operations
Games Graphics
Gnu-Linux
Hardware
Mathematics
Miscellaneous
Small Programs
Sorting