Commit f1ac7f51 authored by Bednárek David RNDr. Ph.D.'s avatar Bednárek David RNDr. Ph.D.
Browse files

ptr difference removed from asgn 4 tests

parent 1018365c
......@@ -2,7 +2,7 @@
int main(int argc, char** argv)
{
int a, b, f;
int a, b;
a = 3;
b = 5;
......@@ -19,11 +19,10 @@ int main(int argc, char** argv)
pc = pa + b;
pd = a + pb;
pe = pb - a;
f = pb - pa;
g = pa[a];
ph = &pb[-b];
printf("*pc=%c *pd=%c *pe=%c f=%d g=%c *ph=%c\n", *pc, *pd, *pe, f, g, *ph);
printf("*pc=%c *pd=%c *pe=%c g=%c *ph=%c\n", *pc, *pd, *pe, g, *ph);
}
{
int g;
......@@ -42,11 +41,10 @@ int main(int argc, char** argv)
pc = pa + b;
pd = a + pb;
pe = pb - a;
f = pb - pa;
g = pa[a];
pb[-b] = 729;
printf("*pc=%d *pd=%d *pe=%d f=%d g=%d arr[2]=%d\n", *pc, *pd, *pe, f, g, arr[2]);
printf("*pc=%d *pd=%d *pe=%d g=%d arr[2]=%d\n", *pc, *pd, *pe, g, arr[2]);
}
return 0;
}
......@@ -13,7 +13,6 @@ int sscanf_0(const char*,const char*,...);
int main_3(int argc_3,char**argv_3){
int a_5;
int b_5;
int f_5;
{
char g_10;
const char*p_13;
......@@ -25,19 +24,19 @@ int main_3(int argc_3,char**argv_3){
const char*ph_11;
}
{
int arr_32[11];
int g_29;
int*pa_30;
int*pb_30;
int*pc_30;
int*pd_30;
int*pe_30;
int*ph_30;
int arr_31[11];
int g_28;
int*pa_29;
int*pb_29;
int*pc_29;
int*pd_29;
int*pe_29;
int*ph_29;
}
}
========== starting main() ==========
*pc=G *pd=K *pe=E f=6 g=E *ph=C
*pc=666 *pd=1010 *pe=444 f=6 g=444 arr[2]=729
*pc=G *pd=K *pe=E g=E *ph=C
*pc=666 *pd=1010 *pe=444 g=444 arr[2]=729
========== main() returned 0 ==========
========== cecko4 done ==========
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment