Given the function definition shown write the function prototype: and a statement that calls the functions with the literal 3: void DisplayMessage(int code) { if (code= 1) { printf("\nSuccess!"); } else { printf("nTry again"); } }

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 23PE
icon
Related questions
Question
Given the function definition shown write the function prototype:
and a statement that calls the functions with the literal 3:
void DisplayMessage(int code)
{
if (code= 1)
{
printf("\nSuccess!");
}
else
{
printf("nTry again");
}
}
Transcribed Image Text:Given the function definition shown write the function prototype: and a statement that calls the functions with the literal 3: void DisplayMessage(int code) { if (code= 1) { printf("\nSuccess!"); } else { printf("nTry again"); } }
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,