GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Given the following function. To change the function to retu…

Given the following function. To change the function to return the product instead of the sum, how many lines of code need to be changed? int Calculate(int a, int b) { return a + b;}int main() { cout

Read Details

What is true about void functions?

What is true about void functions?

Read Details

What is the output? int Calc(int num1, int num2) { return 1…

What is the output? int Calc(int num1, int num2) { return 1 + num1 + num2;}int main() { int x; x = Calc(4, 5); cout

Read Details

How many function calls exist in the following code? int Cal…

How many function calls exist in the following code? int Calc1 (int a, int b) { return a + b / 2;}int Calc2 (int a, int b) { return a * b / 100;}int main () { int x; int y; x = Calc1 (5,3); cout

Read Details

The following program generates an error. Why? void PrintSum…

The following program generates an error. Why? void PrintSum(int num1, int num2) { cout

Read Details

Which character array declaration is appropriate?

Which character array declaration is appropriate?

Read Details

What is the output? int FindSqr(int a) { int t; t = a * a;…

What is the output? int FindSqr(int a) { int t; t = a * a; return a;}int main () { int square; square = FindSqr(10); cout

Read Details

Which line of the function has an error? int ComputeSumOfSqu…

Which line of the function has an error? int ComputeSumOfSquares(int num1, int num2) { int sum; // Line 1 sum = (num1 * num1) + (num2 * num2); // Line 2 return; // Line 3}

Read Details

How many values can a function return via a return statement…

How many values can a function return via a return statement?

Read Details

What is the ending value of the element at index 1? int numb…

What is the ending value of the element at index 1? int numbers[10]; numbers[0] = 35;numbers[1] = 37;numbers[1] = numbers[0] + 4;

Read Details

Posts pagination

Newer posts 1 … 43,937 43,938 43,939 43,940 43,941 … 71,453 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top