include stdio int main int printf printf printf after printf 55 printf

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
#include <stdio.h>
int main()
{
int *p,d,c,b,a;
a=1; b=2;
p=&a;
printf("&p = %p p = %p *p = %d\n",&p, p,*p);
printf("&a = %p &b = %p &c = %p &d = %p\n",&a,&b,&c,&d);
*p=4;
printf("after *p=4;\n&p = %p p = %p *p = %d\n",&p, p,*p);
printf("a = %d b = %d c = %d d = %d\n",a,b,c,d);
p++;
*p=55;
printf("after p++;*p=55;\n&p = %p p = %p *p = %d\n",&p, p,*p);
printf("a = %d b = %d c = %d d = %d\n",a,b,c,d);
*(p+1)=*p+1;
printf("after *(p+1)=*p+1;\n&p = %p p = %p *p = %d\n",&p, p,*p);
printf("a = %d b = %d c = %d d = %d\n",a,b,c,d);
*(p+2)=*(p+1)**(p-1);
printf("after *(p+1)=*p+1;\n&p = %p p = %p *p = %d\n",&p, p,*p);
printf("a = %d b = %d c = %d d = %d\n",a,b,c,d);
}
#include <stdio.h>
int main()
{
int a=-777;
float *b;
b=&a;
printf("%d", *(int*)b);
}
#include <stdio.h>
int main()
{
int a=-777;
float f=55;
void *b;
b=&a;
printf("%d", *(int*)b);
b=&f;
printf("%f", *(float*)b);
}
#include <stdio.h>
int main()
{
int a=-777;
float f=55;
void *b;
b=&a;
printf("%p ", b);
b++;
printf("%p ", b);
}
#include <stdio.h>
int main()
{
int a,b,*p,*p1;
p1=&a;
p=&b;
printf("%p %p ", p, p1);
printf("%d", p1-p);
}
#include <stdio.h>
int main()
{
int **p1, *p, a=6;
printf("&a = %p &p=%p &p1=%p\n", &a, &p, &p1);
p=&a;
p1=&p;
printf("p=%p p1=%p\n", p, p1);
printf("*p=%d *p1=%p\n", *p, *p1);
printf("**p1=%d\n",**p1);
}
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int *a, b;
float *x, y=3.5;
double *m, n;
printf("&a=%p &b=%p &x=%p &y=%p &m=%p &n=%p\n", &a, &b, &x, &y, &m, &n);
printf("Enter b=");
scanf("%d", &b);
a=&b;
x=&y;
printf("a=%p\t b=%d\n", b);
b-=y; //Потеря дробной части
printf("a=%p\t *a=%d\t b=%d\n", a, *a, b);
m=a;
printf("a=%p\t m=%p\n", a, m);
m=&n;
printf("&n=%f\t m=%p\n", &n, m);
n=5.5;
m++;
printf("n=%f\t &n=%p\t m=%p\n", n, &n, m);
*m=(float)*a-n+(int)*x;
printf("m=%p\t *m=%f\n", m, *m);
getch();
m-=1;
printf("n=%f &n=%p m=%p *(m+1)=%f\n", n, &n, m, *(m+1));//Не указано, что нужен &n
return 0;
}