In loginPass function, I want that the Program Ends if Password Entered is WRONG.
When I enter a wrong Password It should End the program... but it goes to ins function...
return 0; doesn't end my program... I'm a complete beginner..
--> Please Help Me and get me solution to this...
I want to End program if password entered is wrong.
The return statement only ends the current function. If you have a function with a non-void return type you should always make sure it returns a value. In loginPass() you don't always return a value.
If loginPass() returns 0 when login fails and 1 when it succeeds you could check the return value in main, where you call the function. If the return value is 1 you call the ins() function, otherwise you just let the main function end.