A pair $(X,O_X)$ is a ringed space if $X$ is a topological space and $O_X$ is a sheaf of rings. If every stalk $O_{X,x}$ is a local ring, then we say that $(X,O_X)$ is a locally ringed space.

In the case of $X$ being an abstract algebraic variety, not necessarily irreducible, and $O_X$ its sheaf of regular functions:

1) Is it possible to have a ringed space which is not a locally ringed one? And if $X$ is irreducible? My guess is NO for the first question and YES for the second.

Correct me if I am wrong. My reasoning goes as follows, since stalks are local we can work on the affine case. All irreducible algebraic varieties are quotient of $K[x_1,\ldots,x_n]$ by a prime ideal and prime ideals always have a unique maximal ideal, corresponding to a point, so the quotient on the point is a field. This seems to work for $K=\mathbb{C}$. In the irreducible case I am not sure of what happens, but for the complex case you can have two lines crossing and I get each of them may work independently giving two local ring ideals? Pure speculative...

2) Is this true for non-algebraically closed fields or fields with positive characteristic?

3) Could you please provide with any example of non-locally ringed spaces? In varieties or schemes, if it is possible.

4) If $X$ is a variety/scheme, is there any example of morphism of ringed spaces which are locally ringed but which is not a morphism of locally ringed spaces? (i.e. for $f\colon X\rightarrow Y$ there is a sheaf morphism $f^\sharp\colon O_Y \rightarrow f_* O_X$ which is not a morphism of local rings on the stalks).

These questions are a bit vague but hopefully you understand what I mean.

`$X=\{x_0\}$`

. Given any ring $R$ there is a sheaf of rings on $X$ with global sections $R$. If $R$ is not local, these ringed space is not a locally ringed space. Of course, such examples are nothing like the ones that arise geometrically. $\endgroup$