Create DFA for all the String Combination of 0&1 which doesn’t allow Substring 110
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char str[50];
int i,len,flag;
clrscr();
printf("\n Enter the
String:-");
gets(str);
len=strlen(str)-1;
for(i=0;i<len;i++)
{
if(str[i]=='1' &&
str[i+1]=='1' && str[i+2]=='0')
flag=1;
}
if(flag==1)
printf("\n INValidddd.....");
else
printf("\n Valid
String");
getch();
}