In the standard form of a quadratic equation: $$ax^2 + bx +c = 0$$ I have read that for both roots to be infinite, $a$ and $b$ should be zero. But if that is the case than quadratic equation reduces to $c = 0$. But it is given that $c$ is not equal to zero.
So, how to solve this contradiction?
(Converting comment to answer.)
We have, generally, $$ ax^2+bx+c=0 \qquad\iff\qquad a + b y + c y^2 = 0$$ where $y:=1/x$ makes sense. It is a not-entirely-unreasonable interpretation that, if the $x$-equation has two "infinite" roots of $x=(\pm)\infty$, then the $y$-equation has a double-root of $y=0$. Thus, the $y$-equation should factor as $c(y-0)(y-0)=0$, so that $a=b=0$.