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

dharam_241086

dharam_241086

@dharam-241086-0VvLsE Oct 27, 2024
😛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. 😁

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • pradeep_agrawal

    pradeep_agrawal

    @pradeep-agrawal-rhdX5z Aug 11, 2008

    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 #-Link-Snipped-#

    -Pradeep