subject

Aprogrammer wants to define a method called myfunc() that takes a float type as an argument and returns an int type. when called as indicated below, the method call should result in a value of 3.0 for the variable z. float z = myfunc( 23f ); // method called from main() public static int myfunc( float x ) { /* … missing code segment … */ return result; } which of the following code segments will produce the correct result when substituted in the myfunc() method? i. int result = x / 7; ii. int result = (int) x / 7; iii. int result = x; result /= 7;

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:00
Which type of tab stop is most for weights and measurements?
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
question
Computers and Technology, 24.06.2019 08:00
Can someone work out the answer as it comes up in one of my computer science exams and i don't understand the cryptovariables
Answers: 1
question
Computers and Technology, 24.06.2019 10:40
Joe needs to see the slide transitions and animations he has applied to his slides in a large view. which presentation view should he use? in which tab would joe find the animations option to make further changes, if any?
Answers: 1
You know the right answer?
Aprogrammer wants to define a method called myfunc() that takes a float type as an argument and retu...
Questions
question
Mathematics, 12.10.2020 14:01
question
History, 12.10.2020 14:01