gdata.io.handleScriptLoaded({"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/","xmlns$gd":"http://schemas.google.com/g/2005","xmlns$georss":"http://www.georss.org/georss","xmlns$thr":"http://purl.org/syndication/thread/1.0","xmlns$blogger":"http://schemas.google.com/blogger/2008","id":{"$t":"tag:blogger.com,1999:blog-5735018943946871385"},"updated":{"$t":"2023-12-09T13:35:10.032-08:00"},"category":[{"term":"Hackerrank Delete duplicate-value nodes from a sorted linked list Solution"},{"term":"Hackerrank Print the elements of a linked list solution"},{"term":"PATTERNS"},{"term":"pattern generation in c"},{"term":"c++ program"},{"term":"Hackerrank Reverse a doubly linked list solution"},{"term":"programming"},{"term":"TEXT ANALYZER"},{"term":"networks"},{"term":"triangle pattern c++"},{"term":"unipolar encoding simulation"},{"term":"Hackerrank Print in Reverse solution"},{"term":"c++"},{"term":"education"},{"term":"opps sandclock pattern"},{"term":"opps triangle pattern"},{"term":"Linked Lists in C++"},{"term":"coding"},{"term":"C++ Diamond Pattern"},{"term":"hourglass pattern c++"},{"term":"hackerrank"},{"term":"java"},{"term":"c"},{"term":"Utopian tree"},{"term":"lexical analyser"},{"term":"cpp"},{"term":"Hackerrank Insert a node into a sorted doubly linked list Solution"},{"term":"java program"},{"term":"mini project"},{"term":"c programming"},{"term":"operator precedence"}],"title":{"type":"text","$t":"GRK"},"subtitle":{"type":"html","$t":"A blog by Gokul Raj Kumar"},"link":[{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"https://www.blogger.com/feeds/5735018943946871385/posts/default/-/lexical+analyser?alt\u003djson-in-script\u0026max-results\u003d6"},{"rel":"self","type":"application/atom+xml","href":"https://www.blogger.com/feeds/5735018943946871385/posts/default/-/lexical+analyser?alt\u003djson-in-script\u0026max-results\u003d6"},{"rel":"alternate","type":"text/html","href":"http://blog.grkweb.com/search/label/lexical%20analyser"},{"rel":"hub","href":"http://pubsubhubbub.appspot.com/"}],"author":[{"name":{"$t":"GRK"},"uri":{"$t":"https://www.blogger.com/profile/00099219911209322075"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"35","height":"35","src":"//www.blogger.com/img/blogger_logo_round_35.png"}}],"generator":{"version":"7.00","uri":"https://www.blogger.com","$t":"Blogger"},"openSearch$totalResults":{"$t":"1"},"openSearch$startIndex":{"$t":"1"},"openSearch$itemsPerPage":{"$t":"6"},"entry":[{"id":{"$t":"tag:blogger.com,1999:blog-5735018943946871385.post-8039109526893003507"},"published":{"$t":"2014-07-06T01:39:00.001-07:00"},"updated":{"$t":"2014-07-06T01:39:04.796-07:00"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"c programming"},{"scheme":"http://www.blogger.com/atom/ns#","term":"c"},{"scheme":"http://www.blogger.com/atom/ns#","term":"lexical analyser"}],"title":{"type":"text","$t":"Lexical Analyzer"},"content":{"type":"html","$t":"\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\nSimple Lexical Analyzer program. It takes the filename in the same directory as the input and analyzes the program for variables operators and special characters. and prints the output for each values separately.\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cpre style\u003d\"background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;\"\u003e\u003ccode style\u003d\"color: black; word-wrap: normal;\"\u003e #include\u0026lt;stdio.h\u0026gt;  \n #include\u0026lt;conio.h\u0026gt;  \n #include\u0026lt;string.h\u0026gt;  \n void main()  \n {  \n      FILE *fp;  \n      int i\u003d0;  \n      char input[100],filename[20];  \n      clrscr();  \n      printf(\"Enter Filename : \");  \n      scanf(\"%s\",filename);  \n      fp\u003dfopen(filename,\"r\");  \n      while(!feof(fp))  \n      {  \n           input[i]\u003dfgetc(fp);  \n           i++;  \n      }  \n      input[--i]\u003d'\\0';  \n      for(i\u003d0;i\u0026lt;strlen(input);i++)  \n      {  \n           if(isalpha(input[i]))  \n           {  \n                printf(\"%c is a Character.\\n\",input[i]);  \n           }  \n           else if(input[i]\u003d\u003d'\u003d'||input[i]\u003d\u003d'+'||input[i]\u003d\u003d'-'||input[i]\u003d\u003d'*'||input[i]\u003d\u003d'/'||input[i]\u003d\u003d'%')  \n           {  \n                printf(\"%c is an Operator.\\n\",input[i]);  \n           }  \n           else if(isspace(input[i])||iscntrl(input[i]))  \n           {  \n           }  \n           else if(isdigit(input[i]))  \n           {  \n                printf(\"%c is a number.\\n\",input[i]);  \n           }  \n           else  \n           {  \n                printf(\"%c is a Special character.\\n\",input[i]);  \n           }  \n      }  \n      getch();  \n }  \n\u003c/code\u003e\u003c/pre\u003e\nNotify the Suggestions about the program through comments ... :)\n\u003c/div\u003e\n"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https://blog.grkweb.com/feeds/8039109526893003507/comments/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https://blog.grkweb.com/2014/07/lexical-analyzer-c-program.html#comment-form","title":"8 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https://www.blogger.com/feeds/5735018943946871385/posts/default/8039109526893003507"},{"rel":"self","type":"application/atom+xml","href":"https://www.blogger.com/feeds/5735018943946871385/posts/default/8039109526893003507"},{"rel":"alternate","type":"text/html","href":"https://blog.grkweb.com/2014/07/lexical-analyzer-c-program.html","title":"Lexical Analyzer"}],"author":[{"name":{"$t":"GRK"},"uri":{"$t":"https://www.blogger.com/profile/00099219911209322075"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"35","height":"35","src":"//www.blogger.com/img/blogger_logo_round_35.png"}}],"thr$total":{"$t":"8"}}]}});