you can write class in C.
The compiler internally passes the object by reference as the first argument for every member function.
example:
say you have a class,

class X{
int funcX(int y); // internall treated as int funcX( X& t, int y);
};

now while calling the funcX,
X xobject;
xobject.funcX(10);

internally, the compiler uses funcX( xobject, 10) to call the function. All these is hidden from the user.

Using the concept above, it is possible to implement classes in C.