Question

Answer whether the following statement is True or False There is no problem with the compiler...

  1. Answer whether the following statement is True or False

There is no problem with the compiler distinguishing these two function definitions:

void func(double x){/*…*/}

int func(double x){/*…*/ return something_double;}

Answer:

  1. Answer whether the following statement is True or False

There is no problem with these two function definitions:

void func(int x){/*…*/}

int func(double x){/*…*/ return something_double;}

             Answer:

Can someone please answer this?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

There is no problem with the compiler distinguishing these two function definitions:

void func(double x){/*…*/}

int func(double x){/*…*/ return something_double;}

false

explanation :- there is compilation error of ambiguating new declaration .Basically  method can not be overloaded if they differ only in the return type like here one have int and other is void

There is no problem with these two function definitions:

void func(int x){/*…*/}

int func(double x){/*…*/ return something_double;}

             Answer:true

it will work

Add a comment
Know the answer?
Add Answer to:
Answer whether the following statement is True or False There is no problem with the compiler...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 1 2 pts The preprocessor executes after the compiler. False True Question 2 2 pts...

    Question 1 2 pts The preprocessor executes after the compiler. False True Question 2 2 pts What code is human-readable and follows the standards of a programming language? Secret code Source code Key code None of these Machine code Question 3 2 pts What is the symbol that marks the beginning of a one line comment? Question 1 2 pts The preprocessor executes after the compiler. True False Question 5 2 pts A statement that may be used to stop...

  • ​​​​​​ 11.   A _____________ error does not cause the compiler to generate an error, but does...

    ​​​​​​ 11.   A _____________ error does not cause the compiler to generate an error, but does cause the program to produce incorrect results. Syntax, logic, variable name, function name 12.   A syntax error occurs when the programmer violates one or more grammar rules of the C language. True or False 13.   Given this line of code: y = sqrt(x); x would be known as the argument. True or False 14.   A void function does not return a value to the...

  • Problem 4 Please determine whether the following statement is true or false and explain your answer...

    Problem 4 Please determine whether the following statement is true or false and explain your answer using both intuition and graph (if the statement is false, you have to provide the counterexample, if true - all possible cases) Substitution effect is always higher than income effect for the inferior good (consider only monetary income) DE

  • QUESTION 1 Which statement results in the value false? The value of count is 0; limit...

    QUESTION 1 Which statement results in the value false? The value of count is 0; limit is 10. (count != 0)&&(limit < 20) (count == 0)&&(limit < 20) (count != 0)||(limit < 20) (count == 0)&&(limit < 20) 10 points    QUESTION 2 If this code fragment were executed in an otherwise correct and complete program, what would the output be? int a = 3, b = 2, c = 5 if (a > b) a = 4; if (...

  • True or false 27. Java compiler does not ignore white spaces such as spaces, tabs, or...

    True or false 27. Java compiler does not ignore white spaces such as spaces, tabs, or blank lines in a Java program. 28. The same variable name(s) can be declared and used within different methods. 29. In Java, 3*'b'+1 is a valid expression. 30. In Java x++ is equivalent to x=x+1. 31. In Java, int x-2.5; is a valid statement. 32. The data type of the Java expression (int) 2.5 is double. 33. A method in Java can return more...

  • Problem 1: Determine whether the statement is true or false. If the statement is true, then...

    Problem 1: Determine whether the statement is true or false. If the statement is true, then prove it. Otherwise, provide a counterexample. (a) If a continuous function f:R +R is bounded, then f'(2) exists for all x. (b) Suppose f.g are two functions on an interval (a, b). If both f + g and f - g are differentiable on (a, b), then both f and g are differentiable on (a,b). Problem 2: Define functions f,g: RR by: x sin(-),...

  • Determine whether the following statement is true or false. If it is false, rewrite it as...

    Determine whether the following statement is true or false. If it is false, rewrite it as a true statement. A sample statistic will not change from sample to sample Choose the correct answer below O A. The statement is false. A sample statistic can change from sample to sample O B. The statement is true. C. The statement is false. A population statistic will not change from population to population. O D. The statement is false. A sample parameter will...

  • Consider the following program: # include <iostream> using namesapce std; void Func(int a, int bl double...

    Consider the following program: # include <iostream> using namesapce std; void Func(int a, int bl double number-25.0: int main) f int x-18, y-20; cout<c"Before: x- kex<" and y-eyecendl; Fundxy 1// end of main void Funcfint a, int b) int sum a+b; a-200; b-300; numberanumber+1.0 Which of the statements below are correct? (Select only the correct answers. There may be more than one) D A The statement double number-25.0; declares a global variable number B. The variables x and y are...

  • Indicate whether the following statement is true or false) In order to receive full credit, you...

    Indicate whether the following statement is true or false) In order to receive full credit, you must provide justification of your answer on the separate sheet you submit(e.g., a proof of a true statement, or a counterexample to a false statement). If f is a continuous function on a smooth curve C' in the xy-plane and Sc f(x, y) ds > 0, then f(x,y) > 0 for all points (x, y) in C. True False

  • Determine whether the following statement is true or false. If the statement is false, make the...

    Determine whether the following statement is true or false. If the statement is false, make the necessary changes(s) to produce a true statement. In V5 = In 5 4 Choose the correct answer below. A. The statement is false. The correct statement is in 5 = In 54 B. The statement is true In 5 OC. The statement is false. The correct statement is in 54 OD. The statement is false. The correct statement is in 5 = 1 4...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT