Making Statment valid

Hi Everyone…

Let us suppose we have following code

int main ()

{

int x = x++;

}

currently this statement will cause undefined behavior. So what should we do with it, i mean to add something before it to make it valid….So here is small solution…

int x=1;

int main ()

{

int x = x++;

}

Defining global variable with same name is one of the solution…

Keep smiling

Posted in General. Tags: . Leave a Comment »