An apartment can be very restricting in being able to grow fresh produce. The main limitations are space, light, temperature, humidity, air, warmth. Apartment farming is doable, but requires creativity and adaptability.
Depends upon how prepared you are to grow food. Do you have solar power? Do you have grow lights? Do you have enough water? Are you prepared to expand your garden into abandoned apartments around you? Do you have the seed and soil? Can you keep it all warm in cold weather or grow enough in warm weather to survive?
All good questions. It may not provide a total solution, but it may enable one to eke out their supplies a little longer, and provide the possibility to trade with others. One's climatic zone and location aspect sunlight v shade will influence what one may grow. Guerilla gardening varieties that are indistinguishable from weeds may also be a useful tactic.