next up previous
Next: About this document ... Up: TwelfthWeek Previous: Problem 3

Problem 4

#include <iostream>
#include <string>
using namespace std;

void f(int a) {
   cout << "int a: " << a << endl;
   return;
}

void f(char a) {
   cout << "char a: " << a << endl;
   return;
}
int main() {
   int i = 1;
   char c = 'c';

   f(i);
   f(c);

   return 0;
}
What output is produced?



cs101 senior TA 2005-10-24