View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12840 Members
Join this group to post and comment.
dharam_241086
dharam_241086 • Aug 8, 2008

Program to check that the string you enter at runtime is a valid variable declaration

😛Hi! friends. this is a mind buster question for you,but it is very very urgent to answer this question as soon as possible, so this is a question :-

😕write a c /c++ program to check that the string you enter at runtime is a valid variable declaration like if a write "int" as a input than message will appear like"valid declaration",this programs also supports all possible combination like"unsigned int","long" and other combination.

Please write a program and send it fast.😁

Thank you for your help. 😁
Re: Program to check that the string you enter at runtime is a valid variable declara

The solution to the problem is a parser which parse the string and gives the output as valid or invalid identifier. You can use tools like Lex to write such parser. Lex is a Parser Generator tool. For more details on Lex see thread https://www.crazyengineers.com/forum/computer-science-engineering/2160-help-writing-compliers.html

-Pradeep

Share this content on your social channels -