xtern 12: expected int fprintf (FILE restrict b3.c:42:6: warning: passing argume
ID: 3788131 • Letter: X
Question
xtern 12: expected int fprintf (FILE restrict b3.c:42:6: warning: passing argument 2 of fprintf( "exp4 Ad", exp4) n file included from lab3.c:5:e: /usr/include/stdio.h:356 :12: note: expected extern int fprintf (FILE restrict strea lab3.c:42:6: warning: format not a string lite print f ("exp4. exp4) [12:17:27] wwgranteioeyl: /1e1e/lab3 [51 vim [12:18:571 wwgrantojoeyl: /1010/lab3 [6] gcc la [12:18:58 /1010/lab3 [7] ./a. ou 4 and int Var2 Expression values are: expl 24 exp2 2. in var3. 5 and int Var4 3 Expression values are: Floating point exception by wwgrantaj oeyl /1010/lab3 [8 J oscr ong to der e support Mobay ter professional edition he mo ExtermamobateExplanation / Answer
Dear Student,
Floating point exceptions may occur due to following reasons...
1: If a number is divide by zero
2: Invalid operation
3: Overflow Value
4: Underflow Value
I mean this floating point error may occur due to the operations which are unpredicted or impossible with the floating point numbers.
In your program floating point exception is occuring due to the 4th Line from the bottom that is following...
exp4 = (intVar4 % 2) / (intVar4 / intVar3);
because the value of
intVar4 =3
intVar3 = 5
After calculating the expression it gives
exp4 = 1/0;
So number is divide by zero, hence floating point error occurs..
Kindly Check and Verify Thanks...!!!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.