Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void changeArray(int a[]);
- void changePri(int );
- int main(){
- int b=1;
- int a[]={2,2,2};
- changeArray(a);
- for(int i=0;i<3;i++){
- cout << a[i]<<",";
- }
- cout <<"\n";
- cout <<"----------------"<<endl;
- changePri(b);
- cout << b;
- return 0;
- }
- void changeArray(int a[]){
- a[2]=1;
- }
- void changePri(int a){
- a=2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement