Skip to content

Commit 0c4c94d

Browse files
committed
Added Solution - GfG to GitHub
1 parent 7ceb25a commit 0c4c94d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//{ Driver Code Starts
2+
#include<iostream>
3+
using namespace std;
4+
void updateVar(int *a);
5+
6+
int main()
7+
{
8+
int t;
9+
cin>>t;
10+
while(t--)
11+
{ int a;
12+
cin>>a;
13+
updateVar(&a);
14+
cout<<a<<"\n";
15+
}
16+
return 0;
17+
}
18+
// } Driver Code Ends
19+
20+
21+
/* This function is invoked by passing the address of the variable.
22+
You need to increment the value stored in the variable by 10 */
23+
24+
/* complete the function below */
25+
26+
void updateVar(int *a)
27+
{
28+
// write your code here
29+
*a+=10;
30+
return;
31+
}

0 commit comments

Comments
 (0)