Question: Explain the relationship between variable and memory (5 points) Contrast local variable vs global variable (5 points) For the code before, find the local and
Explain the relationship between variable and memory (5 points)
Contrast local variable vs global variable (5 points)
For the code before, find the local and global variable(s) and give the program output (10 points)
#include
Define forward declaration (5 points)
Add a function prototype to the code below and explain why it is needed (10 points)
#include
int main()
{
std::cout << "The sum of 3 and 4 is: " << add(3, 4) << std::endl;
return 0;
}
int add(int x, int y)
{
return x + y;
}
7.Contrast passing by value and by reference (5 points)
Read the code below and give program output and explain (10 points)
#include
Define array and explain how it is storage is related to memory (5 points)
Identify the pointer below and draw a figure that illustrate the relationship among the variables below (10 points)
myvar = 25; foo = &myvar; bar = myvar;
Read the code below on struct below and explain: (5 points)
struct product { int weight; double price; } ; product apple; product banana, melon;
Define enumerated types and declare a variable called enum_month which contains the names from three primary colors (5 points)
Write a C++ program that compare two string whether they are equal or not (10 points).
Explain whats const double pi = 3.14159; and const char newline = ' '; in the code below (5 points)
#include
Read the code below and give program output and explain the each line of the code in the main function (10 points)
#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
