P0335 relates to the crankshaft-position sensor circuit. Depending on the fault, the engine may crank without starting, stall, or run inconsistently. Similar symptoms can come from power, ground, wiring, or other engine-management faults.
Note whether the tachometer moves during cranking if the manual says that observation is meaningful for your car. Inspect the connector and wiring, and use the vehicle-specific test before replacing the sensor.
Quick educational note
For information, not a diagnosis or repair instruction. Vehicle-specific checks are still required. Consult the manufacturer's guidance and a qualified technician.
How to use this information
This article explains general principles and does not establish what is wrong with your vehicle. Read the content limitations.