summaryrefslogtreecommitdiff
path: root/6p2.cpp
blob: 17919776100d486cb8098e19e93c24c2863b5342 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

/*
 *
 * 6.2
 *
 *
 */

int main () {

	/* Corrected versions
	  
	  (a)
	  string f() {
	  string s;
	  // . . .
	  return s;
	  }
	  
	  (b)
	  void f2(int i) { }
	  
	  (c)
	  int calc(int v1, int v2) {

	  return v1 + v2;
	  }
	  
	  (d)
	  double square(double x) {
	  return x * x;
	  }
	 */
	return 0;
}