Exercises

ch08 - Users and Groups

  1. When we execute the following code, we find out that it displays the same number twice, event though the two users have different IDs in the password file. Why is this? Answer
printf("%ld %ld\n", (long) (getpwnam("avr")->pw_uid),
                    (long) (getpwnam("tsr")->pw_uid);
  1. Implement getpwnam() using setpwent(), getpwent(), and endpwent(). Answer
نوشته شده در: 1405-03-09 (1 هفته 2 روز 8 ساعت پیش)

من محسن هستم؛ برنامه‌نویس تفننی!

برای ارتباط با من یا در همین سایت کامنت بگذارید و یا به dokaj.ir(at)gmail.com ایمیل بزنید.

در مورد این مطلب یادداشتی بنویسید.