- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction-concept.cpp
More file actions
Latest commit
32 lines (21 loc) · 551 Bytes
/
Copy pathfunction-concept.cpp
File metadata and controls
32 lines (21 loc) · 551 Bytes
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
#include<iostream>
usingnamespacestd;
/** In function overloading there are functions with same name with different parameter.
in this which function will be called that depends on the parameters
**/
/** example of function overloading **/
intsum(int a, int b, int c){
int sum = a + b + c;
return sum;
}
intsum(int a, int b) {
int sum = a + b;
return sum;
}
/** end of example of function overloading **/
intmain() {
// int sumVal = sum(3, 5);
int sumVal = sum(3, 5, 7);
cout << sumVal;
return0;
}