C Program To Receive Out Whether A Given String Is An Identifier Or No longer

C program to discover whether a given string is an identifier or no longer.
A string is named an identifier when he follows these principles:

  • The first letter must be alphabet(both capital or diminutive i.e. A-Z,a-z) or underscore(_).
  • After first letter it contains sequence of alphabet or digits(0-9) or underscore(_) but no longer have any particular symbol(#,@,$,%,^,& and many others.) and home( ).

Suggested:  Java programming (inexperienced persons)

necessary (){ //code by
char string [50];
printf (“Enter price to be identified: “);
scanf (“%s”, string);
int length = strlen (string) – 1;
bool alpha_string = false;
if ( string [0] >= ‘A’ && string [0] <= 'Z' )
alpha_string = true;
if ( string [0] >= ‘a’ && string [0] <= 'z' )
alpha_string = appropriate;
bool underScore = appropriate;
if ( string [length] == ‘_’ )
underScore = false;
int num = 0;
for ( int i = 1; i <= length; i++ ) {
if ( string [i] == ‘_’ )
num = 0;
if ( num == 2 ) {
underScore = false;
if ( alpha_string && underScore)
printf (“Acknowledge: %s is a worthwhile identifiern”, string);
printf (“Acknowledge: %s is no longer a worthwhile identifiern”, string);
} //code by Afolabi Achiever (techbytebox)

Suggested: Full Info on Guidelines on how to put in Xampp
I am hoping your C Program compiles with out error?? if this is the case marvelous fall a comment and we’d be cheerful to enable you to out, else share this net page alongside with your programming pals through any of the social media listed beneath.
Post a Comment (0)
Previous Post Next Post
Jobs Alert To Get Latest Jobs Alerts
Join Our Facebook Page Join Over Facebook Page To Lastest Jobs Update And Notification