3. Write a C program that checks if a given
password is strong,weak or moderate as per
the rules given below:
If it contains combination of digits, alphabets and special
characters, then the password is strong.
If it contains a combination of only digits and alphabets, then
the password is moderate.
If it contains only alphabets, then the password is weak.
3
5. This Program is used to check whether the given Password is Strong, Moderate or
Weak depending upon elements of password. For this we have used multiway
condition statement. i.e., else if ladder.
Syntax of if else ladder:-
if(Condition 1)
{
Statement 1;
}
else if(Condition 2)
{
Statement 2;
}
else
{
Statement n;
}
9. Firstly Password will be inputed by the user and
stored in the variable ‘password’ in the program then
the password is checked whether it contains
alphabets, special characters and digits, if true then
password is Strong, if false then the next condition is
checked whether the password contains alphabets
and digits, if true then password is Moderate, if false
then the password will be declared as Weak.