If President Carter fails to win reelection, it probably will not be because of his inability to cope with inflation or gain freedom for the American hostages in Iran.

Those issues, so painful to the American people, show no real signs of working against him.

These are among the chief findings of a Washington Post poll of voters in Tuesday's Illinois primary. For months, beginning long before the Iowa caucuses in January, political observers have been waiting for the roof to cave in on Carter, saying that voters would not long put aside the problems of runaway inflation and the excruciating national agony and humiliation about the Iran situation.

Carter's 2-to-1 victory over Sen. Edward M. Kennedy in Illinois makes it evident that the roof has not caved in. The Post's poll suggests that, thus far, these two issues -- inflation and the hostage crises -- are not changing voters' minds about the president.

What has been said about Washington, D.C., may be said equally about Carter: he seems to be inflation-proof. It hurts him a little, but not too much.

Democrats interviewed after voting were asked which of these statements they tended to agree with more: "Inflation and the cost of living are such difficult problems that there is not much any president can do about them," or, "Jimmy Carter is just not handling inflation and the cost of living as well as a president should."

Voters split right down the middle -- 50 percent chose the first statement and 50 percent the second.

Among those who felt that a president alone can't do much about inflation, Carter won an overwhelming 83 percent of the vote, compared with 15 percent for Kennedy. Among those who felt that Carter wasn't doing as well as a president should, Kennedy beat Carter, but by a far narrower 53 to 36 percent.

The lesson is a simple one: those who do not blame Carter for inflation are almost monolithic in supporting him; those who do blame him are fairly evenly divided. They don't blame him all that much, or they find other reasons to back him.

A Democratic primary, of course, may not be the best contest for judging whether the entire spectrum of the electorate will or will not punish Carter because of inflation. People like the Republicans and the many independents who crossed over to vote in the Republican primary Tuesday could end up being much harsher on Carter.But past polling by the Post suggests otherwise.

For example, in a late 1978 nationwide poll, taken at a time when Carter was given an overall negative rating for his handling of inflation, the same essential finding was made: just about half the public didn't blame Carter for inflation, and the other half said he wasn't handling inflation as well as a president should.

That poll also asked Democrats and independents to choose between Carter and Kennedy as the 1980 Democratic nominee. Coming at a time when Kennedy was far more popular than he appears to be today, Carter still placed ahead of him among those who felt that a president alone couldn't do much to combat inflation.

What the new Illinois finding seems to suggest, then, is that it is no real surprise that inflation has not devastated Carter. That day may come, of course -- but there is no hint of it yet.

The ongoing Iranian hostage situation, the Post poll suggests, contains the potential to do far more damage to Carter than does inflation. Iran is clearly a voting issue, while inflation seems to be a painful matter but one with less of an effect on the vote.

The Post's Illinois poll asked voters whether they felt Carter had done better than most presidents would have in handling the hostage situation, worse than most presidents would have done, or about average.

Three voters in 10 said Carter had done better than other presidents would have, and almost half felt that he had done about average.Both of these groups voted overwhelmingly for him. Eighteen percent said he had done worse than others would have, however, and among them, only one voter in 10 pulled the lever for Carter, according to the poll.

It seems clear that if the day comes that Carter is perceived as being derelict in his handling of the hostage situation, he will be heavily punished for it. But the hostages were taken on Nov. 4 -- today is day No. 138 -- and such punishment seems nowhere in sight.

After so long a period an 18 percent negative rating must be considered minimal.

Most voters in Illinois, at least, seem to take the view that Carter is doing about as well as may be expected in a situation no president could control, given the aim of returning the hostages safely.

Many observers have attributed Carter's climb from a bottom-scraping to a respectable position in the opinion polls to public dissatisfaction with Kennedy. No doubt, some of Carter's rise is due to that.

In the Post's poll, 27 percent of thsoe who voted for the president said they did so mainly because they disapproved of his opponents.

However, 44 percent said they backed Carter mainly because they approve of him, and an additional 28 percent said their vote for Carter resulted from a combination: they approved of Carter and disapproved of Kennedy.

Almost three of every four Carter supporters in Illinois, then, selected him because they like him to some degree, and not because they consider him merely the lesser of two evils.

In addition, the knack Carter displayed in the 1976 primaries of persuading voters that his views are close to theirs continues to work for him.

Those polled in Illinois were asked to denote their political ideology and that of the candidates on a scale in which "1" stood for "very liberal" and "9" for "very conservative."

When the numbers were averaged, those voting in the Democratic primary gave themselves a rating of 5 -- right in the middle. Those who considered themselves liberal had a tendency to see Carter as liberal; moderates thought him moderate, and conservatives tended to see him as conservative. Overall, they gave Carter the same rating they gave themselves -- 5.