Advertisement
a3f

Spot the problem

a3f
Dec 26th, 2014
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void)
  5. {
  6.     int flag = 0;
  7.     char passwd[10];
  8.  
  9.     gets(passwd);
  10.  
  11.     if(0 == strcmp("hunter2", passwd))
  12.         flag = 1;
  13.  
  14.     if(flag)
  15.         printf("\n Correct Password \n");
  16.     else
  17.         printf("\n Incorrect Password \n");
  18.    
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement