I'd suggest you first remove the space in the scanf command after %s and %d. Also you need to change the %d to %s as you are using alphanumeric password(having alphabets also) and you should scanf 'a' instead of 'user_id' and 'b' instead of 'pass' furthermore you must do a strcmp after user has input the values or else it will always be incorrect. The correct code is below:
#include <stdio.h>
#include <string.h>
int main()
{
char user_id[16]="ishurastogi2001", pass[]="ishu2001", a[16], b[9];
int x,y;
x=strcmp(a, user_id);
y=strcmp(b, pass);
for(int n=1; n<=3; n++)
{
printf("Enter User ID:");
scanf("%s", &a);
x=strcmp(a, user_id);
if(x==0)
{
printf("Enter user password: ");
scanf("%s", &b);
y=strcmp(b, pass);
if(y==0)
{
printf("You are logged in...");
}
else
{
printf("Incorrect Password, try again...");
}
}
else
{
printf("Invalid User Id...");
}
if(n>5)
{
printf("Access Denied...");
}
}
return 0;
}
The code above will ask you the user name and if correct then pass. It will continue to ask three times even if correct thus I advise to use a break statement.