Regular expression in 'c' language - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Regular expression in 'c' language

mdtayemdtaye Posts: 5Member
can anyone guide me to write regular expression in 'c' language for the following statement
a) Assignment
b) For
c) switch

thanx


Comments

  • screwscrew Posts: 5Member
    hi,
    lets see if we can clear these doubts, u r having.
    a) Assignment
    it is simple just use:-
    variable_name = value or expression yielding result of the same data type th variable is.

    b) For
    its syntax goes like this:-
    for(x=0; x< 5; x++)
    {.............}
    .here x is a variable used to check some condition to skip the loop (optional)
    .here x<5 is the condition it could be anything
    .last part i.e. x++ is used for updation of a variable.
    working:-
    first part is executed only once in the start of the loop execution,
    second part is executed next and if the conditin is true statements in the curly braces will be executed then third part i.e. updation part will be executed.
    then one again condition will be checked amd the cycle repeats.

    c)switch
    it is a kind of selector which selecta particular part of the code to be executed depending upon the value of a variable.
    syntax:-
    switch(variable)
    {
    case first_value: {statements to be executed if variable = first_value}
    case second_value:{statements to be executed if variable=second_value}
    .
    .
    .
    .
    default: { statements to be executed if no match found}
    };
    remember that each block of code should have 'break;' as the ending statement or every block after the chosen will also be executed.


    : can anyone guide me to write regular expression in 'c' language for the following statement
    : a) Assignment
    : b) For
    : c) switch
    :
    : thanx
    :
    :
    :



Sign In or Register to comment.