Imagine that a giant meteor stuck the earth. When the meteor struck the earth it sent up a giant dust cloud that blocked out the sun for months. What would be the effect of this event on humans? Do you think that human life could survive for years without sunlight?
It would depend on the depth and thickness of the cloud and exactly what percentage of the Sun's energy was allowed through. If all of the Sun's energy was blocked out such that it was as if the Sun no longer existed, then all life on Earth would die out very quickly (a matter of days). The lack of heat from the Sun would cool the planet very quickly to well below human tolerance for cold. But most likely some of the Sun's warmth would penetrate the cloud and reach the surface. Assuming that the cloud essentially produced a permanent night, where there was no real sunlight but the temperature of the planet remained habitable, then yes many humans could survive for a period of several months. If you think about it, a place like Alaska goes for many weeks without sunlight every winter. They cannot grow their own food under these conditions, but a constant food supply is brought in and everyone survives the winter. So populations that have a built up non-perishable food supply would survive just fine. Make no mistake, an appreciable percentage of the world's population who live on the edge to begin with would not survive. But with a stockpiled amount of food, survival for several months is definitely achievable. But the sunlight would need to come back eventually, because with no sunlight you cannot produce food which obviously is a ticking clock for human extinction.