Mass air flow sensor

When the mass air flow sensor fails, what reaction occurs to a running engine?

The check engine light comes on. The ECM has a work around so the engine may still appear to run ok.

The car runs rough and then quits. Is this the fault of the mass air flow sensor or has something else failed?

Is a Check Engine light on? Can you read the codes for free at a local auto parts store?

More clues needed including symptoms, causal factors, year of car, # of miles.

Why do you suspect MAF sensor, could be dozens of things.