/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that prints current user's
full name. */
#include <stdio.h>
#include <unistd.h>
#include <pwd.h>

int main() {
    struct passwd *user;
    char *usrname;
    
    usrname = getlogin();
    user = getpwnam(usrname);
    printf(" the current user's fullname is '%s' \n",user->pw_gecos);
}
