

MCQOPTIONS
Saved Bookmarks
1. |
If a function fun() is to sometimes receive an int and sometimes a double then which of the following is the correct way of defining this function? |
A. | <pre><code class="csharp">static void fun(object i) { ... }</code></pre> |
B. | <pre><code class="csharp">static void fun(int i) { ... }</code></pre> |
C. | <pre><code class="csharp">static void fun(double i, int j) { ... }</code></pre> |
D. | <pre><code class="csharp">static void fun(int i, double j) { ... }</code></pre> |
E. | <pre><code class="csharp">static void fun(int i, double j, ) { ... }</code></pre> |
Answer» B. <pre><code class="csharp">static void fun(int i) { ... }</code></pre> | |