Which of the following function will be called with the independent syntax 'sample(10,20,30);'?

74. Which of the following function will be called with the independent syntax "sample(10,20,30);"?

  1. void sample(int x, int y)
  2. void sample(int x=0, int y, int z)
  3. float sample(int x=0, y=0, z=0)
  4. void sample(int x, int y, int z=0)

Answer: D) void sample(int x, int y, int z=0)

Explanation:

In the above options, option D is correct. Option C is incorrect because the return type is "float" and the syntax given is independent which means it doesn't return any value.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.