Write a C program to verify the String 0(0|1)*1


#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
          char str[20];
          int i,len;
          clrscr();
          printf("\n Enter the String:-");
          gets(str);
          len=strlen(str)-1;
          if((str[0]=='0' && str[len]=='1'))
                   printf("\n Validddd.....");
          else
                   printf("\n INValid String");
  getch();
}

Related Posts Plugin for WordPress, Blogger...

Engineering material

GTU IDP/ UDP PROJECT

GTU IDP/ UDP PROJECT

Patel free software download

  © Blogger templates The Professional Template by Ourblogtemplates.com 2008

Back to TOP