Assignment 4 – Macros0

$30.00 $24.00

Using the following macro definition, expand the macro invocations below. fruit(%name, %nutrient1, %nutrient2=sugar) ::0 %name are rich in %nutrient1 and %nutrient2 ;; Question 1 I have heard that %fruit(%name=bananas, %nutrient1=potassium) Your Answer: Question 2 10/ 1 pts I have heard that %fruit(%name=oranges, %nutrient2=Vitamin C, %nutrient1=niacin) Question 3 00/ 1 pts I have heard that %fruit(%name=apples,…

Rate this product

You’ll get a: zip file solution

 

Categorys:

Description

Rate this product

Using the following macro definition, expand the macro invocations below.

fruit(%name, %nutrient1, %nutrient2=sugar) ::0 %name are rich in %nutrient1 and %nutrient2 ;;

Question 1

I have heard that %fruit(%name=bananas, %nutrient1=potassium)

Your Answer:

Question 2 10/ 1 pts

I have heard that %fruit(%name=oranges, %nutrient2=Vitamin C, %nutrient1=niacin)

Question 3 00/ 1 pts

I have heard that %fruit(%name=apples, %nutrient2=Vitamin D)

Question 4 20/ 2 pts

Assuming that your macro processor supports nested macros, use the following definitions:

source :: WebMD.com ;;

fruit(%name, %nutrient1, %nutrient2=sugar) ::0

According to %source, %name are rich in %nutrient1 and

%nutrient2 ;;

Expand the following macro:

%fruit(%name=kiwis, %nutrient1=Vitamin D, %nutrient2=Vitamin K)

Your Answer:

Question 5 20/ 2 pts

Two mechanisms for implementing the processing of nested macros are:

iteration

0and

recursion

Assignment 4 - Macros0
$30.00 $24.00