-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCODE11.cpp
More file actions
31 lines (29 loc) · 1.37 KB
/
CODE11.cpp
File metadata and controls
31 lines (29 loc) · 1.37 KB
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
#include<iostream>
using namespace std;
// //LEARNING ABOUT INLINE FUNCTION,and static
// // inline int multipl(int va1,int va2)//<----------THIS IN INLINE FUNCTION N0.1
// // {
// // return va1*va2;
// // }
// inline int static_m(int va11,int va22)
// {
// static int s33=0;
// s33=s33+1; //<--------------------STATIC VALUE ARE LIKE A LOOP WE CAN RUN WITH INCREMENT WHENEVER WE CALL IT N0.2
// return va11*va22+s33;
// }
int main()
{
// int a=2,b=3;
// // cout<<multipl(a,b)<<endl;
// // cout<<multipl(a,b)<<endl;
// // cout<<multipl(a,b)<<endl; //<-----------WHEN WE CALL THE FUNCTION MANY TIME SO WE APPLY INLINE IN FUNCTION
// // cout<<multipl(a,b)<<endl;
// // cout<<"this is your answer = "<<static_m(a,b)<<endl;
// // cout<<"this is your answer = "<<static_m(a,b)<<endl;
// // cout<<"this is your answer = "<<static_m(a,b)<<endl;
// // cout<<"this is your answer = "<<static_m(a,b)<<endl;<---------STATIC VALUE NO.2
// // cout<<"this is your answer = "<<static_m(a,b)<<endl;
// // cout<<"this is your answer = "<<static_m(a,b)<<endl;
// // cout<<"this is your answer = "<<static_m(a,b)<<endl;
// // cout<<"this is your answer = "<<static_m(a,b)<<endl;
}