C Programming
Lab(BCSPSL116)
3) Develop a C program that takes a unique identification input like PAN
Number, AADHAR Number, APAAR_Id, Driving License, Passport and checks
it against a set of stored KYC records. Based on the input, display
whether the individual is verified or not. Use an appropriate control
structure to handle multiple possible ID matches. Assume all Unique
identification are of integer type.
#include <stdio.h>
#define SIZE 5
int main()
{
int panNumbers[SIZE] = {12345, 23456, 34567, 45678, 56789};
int aadharNumbers[SIZE] = {11111, 22222, 33333, 44444, 55555};
int apaarIds[SIZE] = {10101, 20202, 30303, 40404, 50505};
int drivingLicenses[SIZE] = {98765, 87654, 76543, 65432, 54321};
int passportNumbers[SIZE] = {11223, 22334, 33445, 44556, 55667};
int choice, id, i, found = 0;
printf("KYC Verification System\n");
printf("Select ID type:\n");
printf("1. PAN Number\n");
printf("2. AADHAR Number\n");
printf("3. APAAR ID\n");
printf("4. Driving License\n");
printf("5. Passport\n");
printf("Enter your choice (1-5): ");
scanf("%d", &choice);
if (choice < 1 || choice > 5)
{
printf("Invalid choice. Exiting.\n");
return 0;
}
printf("Enter your ID number: ");
scanf("%d", &id);
switch (choice)
{
case 1:
for (i = 0; i < SIZE; i++)
{
if (panNumbers[i] == id)
{
printf("Status: VERIFIED\n");
found = 1;
break;
}
}
break;
case 2:
for (i = 0; i < SIZE; i++)
{
if (aadharNumbers[i] == id)
{
printf("Status: VERIFIED\n");
found = 1;
break;
}
BIET, 1
Davanagere
C Programming
Lab(BCSPSL116)
}
break;
case 3:
for (i = 0; i < SIZE; i++)
{
if (apaarIds[i] == id)
{
printf("Status: VERIFIED\n");
found = 1;
break;
}
}
break;
case 4:
for (i = 0; i < SIZE; i++)
{
if (drivingLicenses[i] == id)
{
printf("Status: VERIFIED\n");
found = 1;
break;
}
}
break;
case 5:
for (i = 0; i < SIZE; i++)
{
if (passportNumbers[i] == id)
{
printf("Status: VERIFIED\n");
found = 1;
break;
}
}
break;
}
if (!found)
printf("Status: NOT VERIFIED\n");
return 0;
}
Output:
1. KYC Verification System
Select ID type:
1.PAN Number
2.AADHAR Number
3.APAAR ID
4.Driving License
5.Passport
Enter your choice (1-5): 1
Enter your ID number: 12345
Status: VERIFIED
2. KYC Verification System
Select ID type:
1.PAN Number
2.AADHAR Number
BIET, 2
Davanagere
C Programming
Lab(BCSPSL116)
3.APAAR ID
4.Driving License
5.Passport
Enter your choice (1-5): 6
Invalid choice. Exiting.
BIET, 3
Davanagere