The charge of a proton inside an atomic nucleus is still positive, just like its charge when it is not inside a nucleus. The charge of a proton is +1 elementary charge, which is approximately 1.6 x 10^-19 coulombs.
The reason for the positive charge of a proton lies in the fundamental properties of the particles that make up the atom. Protons are elementary particles, specifically a type of quark known as an up quark (u). Up quarks have a positive charge of +2/3 elementary charge.
Within the nucleus of an atom, protons are held together by the strong nuclear force, which is a fundamental force of nature. This force overcomes the electromagnetic repulsion between the positively charged protons and keeps them bound within the nucleus.
While it is true that protons repel each other due to their positive charges, the strong nuclear force is stronger than the electromagnetic force at the nuclear scale. This force holds the nucleus together, allowing protons to coexist despite their mutual repulsion. The strong nuclear force acts between the quarks inside the protons and neutrons, effectively neutralizing the electromagnetic repulsion and binding the nucleons (protons and neutrons) together.
So, while there is a repulsive force between protons, the strong nuclear force acts as the "glue" that overcomes this repulsion and maintains the stability of atomic nuclei.