Skip to content

Commit

Permalink
Merge pull request #39 from CristinaIonela07/D-intro-quiz-function-ov…
Browse files Browse the repository at this point in the history
…erloading

Update function-overloading.md : row 35
  • Loading branch information
RazvanN7 authored Nov 7, 2022
2 parents 94f509d + 32edfd6 commit 5d72b1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/intro/quiz/function-overloading.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void main()
```

{% assign q1_text = "What is the output for the snippet above?" %}
{% assign q1_choices = "Runtime error at 1st call of fun()| Runtime error at 2nd call of fun()| hello world!| 42| 42 Hello World!" | split: "| " %}
{% assign q1_choices = "Runtime error at 1st call of fun()| Runtime error at 2nd call of fun()| hello world!| -42| -42 Hello World!" | split: "| " %}
{% assign q1_feedbacks = "The call `fun('hello world!')` will trigger our first function(that takes as input a string). It respects the `in` contract so it will just return -42. The second call `fun(-42)` will trigger the second function. At the end of the function the value of `x` will be **-42 * -42**, it respects the `out` contract, so it will return 'Hello World!'| The call `fun('hello world!')` will trigger our first function(that takes as input a string). It respects the `in` contract so it will just return -42. The second call `fun(-42)` will trigger the second function. At the end of the function the value of `x` will be **-42 * -42**, it respects the `out` contract, so it will return 'Hello World!'| The call `fun('hello world!')` will trigger our first function(that takes as input a string). It respects the `in` contract so it will just return -42. The second call `fun(-42)` will trigger the second function. At the end of the function the value of `x` will be **-42 * -42**, it respects the `out` contract, so it will return 'Hello World!'| The call `fun('hello world!')` will trigger our first function(that takes as input a string). It respects the `in` contract so it will just return -42. The second call `fun(-42)` will trigger the second function. At the end of the function the value of `x` will be **-42 * -42**, it respects the `out` contract, so it will return 'Hello World!'| Correct!" | split: "| " %}
{% assign q1_correct = 4 %}
{% include mc-quiz.html text=q1_text choices=q1_choices answer=q1_correct feedback=q1_feedbacks %}

0 comments on commit 5d72b1c

Please sign in to comment.