No, if you’re flying under the floor of Class B or Class C airspace, then you’re not in that controlled airspace.
If Class C airspace starts at 4,000 ft. MSL, as an example, and there’s nothing else indicated on the sectional chart, then you’d be in Class G airspace from the surface up to 1,200 ft. AGL, where you’d hit Class E airspace, and then at 4,000 ft. MSL you’d hit Class C airspace.