That depends.
MOST refrigerators---if kept closed--- can keep foods cold for 24 hours after the compressor stops working. Freezer should be kept closed; as long as frozen solid, those foods will be okay to eat. Strive to quickly resolve the problem, so you can transfer from old frig / freezer to new.
However, if you don't know WHEN the problem occurred, you MUST NOT trust a 24-hour window. It might be more like 6 hours, not 24. Foods can feel cool on packaging, but the actual food may have gotten too warm.
"If in doubt (that it is good now), throw it out." Milk, some cheeses, deli foods, meats, and previously cooked foods can go bad quickly.
In the refrigerator.
A refrigerator should be set at a temperature of 37-40 degrees Fahrenheit for optimal food storage.
The temperature of your refrigerator should be set at 37 to 40 degrees Fahrenheit for optimal food preservation.
A refrigerator should be set at a temperature of 40F (4C) to ensure food safety and freshness.
The refrigerator should be set at a temperature of 40F (4C) to ensure food safety and freshness.
Refrigerator, cupboards, freezers
Refrigerator, cupboards, freezers
A refrigerator should be set to a temperature between 35 and 38 degrees Fahrenheit for optimal food storage.
Your refrigerator temperature should be set at or below 40 degrees Fahrenheit to keep food safe and fresh.
The refrigerator temperature should be set at or below 40 degrees Fahrenheit to ensure food safety and freshness.
The temperature in a refrigerator should be set at or below 40 degrees Fahrenheit to keep food safe and fresh.
The temperature in a refrigerator should be set at or below 40 degrees Fahrenheit to ensure food safety and preservation.