Question: My program is running fine when i run it on VS with my own 'main()' function but i have to submit this where main is hidden from me I only know that it will pass arguements to my functions and check their return result. But it is giving segmentation fault error when I try to use arguement passed to my function.
Here is the code:

```
//I don't know what 'main' is passing to this function

string ExpressionManager::infixToPostfix(string infixExpression)
{   

cout<<infixExpression<<endl; // first it was giving error on below 'if' condition,  
    //now i have written this statement it prints nothing but gives 
     //Segmentation Fault (core dumped) error here

cout<<"Hey"<<endl //it doesn't print this line

if( infixExpression[0] == '\0' )
{
    return "";
}
int size = infixExpression.length();
if(!isValidInfixExpression(infixExpression))
    return "Invalid Expression";
      ...
      //some code here
}

```

Can Anyone Elaborate when string class behave this way?

Answer: 
Shouldn't it be?

```
var d = value.FirstOrDefault(x => String.Equals(x.Culture, Thread.CurrentThread.CurrentCulture.Name, StringComparison.InvariantCultureIgnoreCase));

```
Your issue is here:

```
var d ... x.Culture == Thread.CurrentThread.CurrentCulture.Name

```

This evaluates to `true`, so `string.Equals` where it is used yields unexpected results.

So the right code:

```
var d = value.FirstOrDefault(x => String.Equals(x.Culture, Thread.CurrentThread.CurrentCulture.Name, StringComparison.InvariantCultureIgnoreCase));

```