Question: The following function has a bug and doesn't work as expected. What is the issue with this function and how will you fix it?
The following function has a bug and doesn't work as expected. What is the issue with this function and how will you fix it? //lfx is greater than y, this function should return 1. //Else, this function returns 0. intis greater(unsignedintx.unsignedinty) { if(x-y>0) return 1; else return 0; }
Step by Step Solution
3.36 Rating (146 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
