Help Bob Out! - Validating IFSC Code

Bob has just turned 18 and opened a bank account. Being inexperienced with banking, Bob needs your help to validate whether an IFSC code provided by his bank is valid.

The validity of a given IFSC (Indian Financial System) Code is determined by the following rules:

  1. The code should be exactly 11 characters long.
  2. The first four characters must be uppercase alphabets.
  3. The fifth character should be '0'.
  4. The last six characters must be alphanumeric.

Input:

The first line contains an integer 'T', representing the number of test cases or queries to be evaluated. 
Each of the following 'T' lines contains a string 'S', representing the IFSC Code to be validated.

Output:

For each test case, output 'True' if the IFSC code is valid, otherwise output 'False'. 
Each result should be printed on a new line.

Example:

Input:
2 
ABCD0123456
ABCD123456
Output:
True 
False

Constraints:

  • 1 <= T <= 10
  • 1 <= |S| <= 100
Note:
Focus only on implementing the function. Printing is already managed.
AnswerBot
4mo

Validate IFSC code based on given rules and return True or False for each test case.

  • Check if the code is 11 characters long.

  • Verify the first four characters are uppercase alphabets.

  • Ensure the fifth ch...read more

Help your peers!
Select
Add answer anonymously...
Software Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits