int g cout Inside function g endl int h cout Inside function h endl What is

Int g cout inside function g endl int h cout inside

This preview shows page 49 - 53 out of 53 pages.

int g() { cout << "Inside function g" << endl; int h() { cout << "Inside function h" << endl; } }
Image of page 49
What is Wrong? int sum(int x, int y) { int result; result = x + y; }
Image of page 50
What is Wrong? int sum(int n) { if (n == 0) return 0; else n + sum(n-1); }
Image of page 51
What is Wrong? void f(double a); { float a; cout << a << endl; }
Image of page 52
What is Wrong? void product() { int a, b, c, result; cout << "Enter 3 integers: "; cin >> a >> b >> c; result = a * b * c; cout << "Result is " << result; return result; }
Image of page 53

You've reached the end of your free preview.

Want to read all 53 pages?

  • Fall '08
  • STAFF
  • Local variable, Global variable

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture