Use the following program with Pascal like syntax for the questions below that ask about parameter passing mechanisms.
program myprogram;
var
W : integer;
Z : array [0..2] of integer;
procedure Swap(M : integer; N : integer);
begin
temp : integer;
temp := M;
M := N;
N := temp;
end;
begin {main}
W := 1;
Z[0] := 3;
Z[1] := 2;
Z[2] := 1;
Swap(W, z[W]);
writeln(W);
writeln(z[0]);
writeln(z[1]);
writeln(z[2]);
Swap(W, z[W]);
writeln(z[0]);
writeln(z[1]);
writeln(z[2]);
end.
By value By reference By name
بتاريخ الآن قال محمد الحربي13:
Use the following program with Pascal like syntax for the questions below that ask about parameter passing mechanisms.
program myprogram;
var
W : integer;
Z : array [0..2] of integer;
procedure Swap(M : integer; N : integer);
begin
temp : integer;
temp := M;
M := N;
N := temp;
end;
begin {main}
W := 1;
Z[0] := 3;
Z[1] := 2;
Z[2] := 1;
Swap(W, z[W]);
writeln(W);
writeln(z[0]);
writeln(z[1]);
writeln(z[2]);
Swap(W, z[W]);
writeln(z[0]);
writeln(z[1]);
writeln(z[2]);
end.
By value By reference By name
هذي 👇الاجابه بالنسبه للreference
بتاريخ 5 دقائق مضت قال محمد الحربي13:
Use the following program with Pascal like syntax for the questions below that ask about parameter passing mechanisms.
program myprogram;
var
W : integer;
Z : array [0..2] of integer;
procedure Swap(M : integer; N : integer);
begin
temp : integer;
temp := M;
M := N;
N := temp;
end;
begin {main}
W := 1;
Z[0] := 3;
Z[1] := 2;
Z[2] := 1;
Swap(W, z[W]);
writeln(W);
writeln(z[0]);
writeln(z[1]);
writeln(z[2]);
Swap(W, z[W]);
writeln(z[0]);
writeln(z[1]);
writeln(z[2]);
end.
By value By reference By name
السؤال
محمد الحربي
Use the following program with Pascal like syntax for the questions below that ask about parameter passing mechanisms.
program myprogram;
var
W : integer;
Z : array [0..2] of integer;
procedure Swap(M : integer; N : integer);
begin
temp : integer;
temp := M;
M := N;
N := temp;
end;
begin {main}
W := 1;
Z[0] := 3;
Z[1] := 2;
Z[2] := 1;
Swap(W, z[W]);
writeln(W);
writeln(z[0]);
writeln(z[1]);
writeln(z[2]);
Swap(W, z[W]);
writeln(z[0]);
writeln(z[1]);
writeln(z[2]);
end.
By value By reference By name
هذي 👇الاجابه بالنسبه للreference
وهذا الاجابه للvalue
1 جواب على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.