/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that prints all the groupname */
#include <stdio.h>
#include <grp.h>
#define SIZE 1024 
           
int main() {
    struct group result, *temp;
    char buffer[SIZE];
    
    getgrent_r(&result,buffer,SIZE,&temp);
    printf(" the group name is '%s' \n",result.gr_name);
}
