fork(1) download
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<string.h>
  4.  
  5. int main(void)
  6. {
  7. char pass_buff[50] = {0};
  8. printf("\n Enter the passphrase:");
  9. fgets(pass_buff,sizeof(pass_buff)-1,stdin);
  10. pass_buff[strlen(pass_buff)-1] = '\0';
  11. if ((strcmp(pass_buff,"Linux"))){
  12. printf("\t*** Missmatch ***\n");
  13. exit (EXIT_FAILURE);
  14. }
  15. printf("\t*** Match ***\n");
  16. }
Runtime error #stdin #stdout 0s 2012KB
stdin
Standard input is empty
stdout
 Enter the passphrase:	*** Missmatch ***