Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

: In function `int main()\': :101: invalid operands of types `double\' and `int\

ID: 3608531 • Letter: #

Question

: In function `int main()': :101: invalid operands of types `double' and `int' tobinary    `operator^' :101: invalid operands of types `double' and `int' tobinary    `operator^' :102: parse error before `;' token :108: warning: assignment to `char' from `double' :108: warning: argument to `char' from `double' :109: parse error before `;' token

How can I solve this problem... Thanks : In function `int main()': :101: invalid operands of types `double' and `int' tobinary    `operator^' :101: invalid operands of types `double' and `int' tobinary    `operator^' :102: parse error before `;' token :108: warning: assignment to `char' from `double' :108: warning: argument to `char' from `double' :109: parse error before `;' token

How can I solve this problem... Thanks

Explanation / Answer

101: invalid operands of types `double' and `int' tobinary    `operator^' :101: invalid operands of types `double' and `int' tobinary    `operator^'

Reason of above two problems is that you have applied operator ( ^) to the double value , which is illegal. You can't operate doubledata using ^ . so you will need to change double toint.






:102: parse error before `;' token
Reason: You are missing some token oroperator before (;)this token. So try to find that token or postthe code so that i can figure out which token you aremissing.



:108: warning: assignment to `char' from `double'
:108: warning: argument to `char' from `double'
reason: You are storing double value to char.It should be typecast before assigning.
like char ch;double d;

ch = (char) d;



:109: parse error before `;' token
Reason: You are missing some token oroperator before this (;) token. So try to find that token or postthe code so that i can figure out which token you aremissing.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote