I was studying on effects of `virtual` keyword in C++ and I came up with this code.

```
#include<iostream>

using namespace std;

class A {
public:
    virtual void show(){
        cout << "A \n";
    }
};

class B : public A {
public:
    void show(){
        cout << "B \n";
    }
};

class C : public B {
public: 
    void show(){
        cout << "C \n"; 
    }
};

int main(){

    A *ab = new B;
    A *ac = new C;
    B *bc = new C;
    ab->show();
    ac->show();
    bc->show();

}

```

The expected output is: 

```
B
C
B

```

Since `show` function in B is non-virtual. But the outcome when you compile this is:

```
B
C
C

```

It behaves as if `show` function in B is virtual. Why is this the case? Does B class gets overridden here? How come I point to the A class if I'm pointing a C class to the B class?