#include <stdio.h>
#include <string.h>

int checkpassword() {
   int ok=0;
   char buffer[8];

   printf("Adres van buffer = %p, adres van ok = %p\n\n", buffer, &ok);

   printf("Geef password: ");
   gets(buffer);
   if (strcmp("Geheim!", buffer)==0) {
		ok=1;
   }
   return ok;
}

int main() {
   if (checkpassword()) {
      printf("Toegang tot geheime informatie.\n");
   }
   else {
      printf("Onjuist password!\n");
   }
   fflush(stdin);
   getchar();
   return 0;
}
