السلام عليكــم ورحمـة الله وبركاتــه
code 1
#include <iostream.h>
void two(int x)
{
x=2;
cout<<x<<endl;
}
int main()
{
int y=1;
two(y);
cout<<y<<endl;
return 0;
}الناتج
2
1
code 2
#include <iostream.h>
void two(int &x)
{
x=2;
cout<<x<<endl;
}
int main()
{
int y=1;
two(y);
cout<<y<<endl;
return 0;
}الناتج
2
2
وشكرااااا