How can one write a c password program that accepts only 3 attempts of password input

Recommended Answers

You can use variable to count the number of attempt with if else condition

Jump to Post

All 2 Replies

You can use variable to count the number of attempt with if else condition

If you want to keep the number of attempt to be in the memory. Then you can store it the file. Like if one enter wrong password once and then closes the program, then also there will be only two attempt left as you are storing the last attempt in the memory.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.