Advertisement
is_a_cdr

Memset.c

Nov 21st, 2012
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <string.h>
  2. #include <stdio.h>
  3.  
  4. #define MAX_PASSWORD_LEN 100
  5.  
  6. void InputPassword(char *password)
  7. {
  8.   scanf("%s", password);
  9. }
  10.  
  11. void ProcessPassword(char *password)
  12. {
  13.   printf("%s", password);
  14. }
  15.  
  16. void Foo()
  17. {
  18.   char password[MAX_PASSWORD_LEN];  
  19.   InputPassword(password);
  20.   ProcessPassword(password);
  21.   memset(password, 0, sizeof(password));
  22. }
  23.  
  24. int main() {
  25.   Foo();
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement