naka_by_n

#include <stdio.h> #include <stdlib.h> int x; int y; int *p; int t; float y1; float *p1; float f; char y2; char *p2; char c; double y3; double *p3; double d; unsigned u; int pos; main() { t = sizeof(x); printf("el entero ocupa %d byte\n", t); printf("la posicion del entero es %d\n", &t); printf("el valor del entero es %d\n\n", x); t = sizeof(f); printf("el float ocupa %d byte\n", t); printf("la posicion del float es %d\n", &f); printf("el valor del float es %d\n\n", f); t = sizeof(c); printf("el char ocupa %d byte\n", t); printf("la posicion del char es %d\n", &c); printf("el valor del char es %d\n\n", c); t = sizeof(d); printf("el double ocupa %d byte\n", t); printf("la posicion del double es %d\n", &d); printf("el valor del double es %d\n\n", d); t = sizeof(u); printf("el unsigned ocupa %d byte\n", t); printf("la posicion del unsigned es %d\n", &u); printf("el valor del unsigned es %d\n\n", u); x = 215; p = &x; y = *p; printf("y vale %d\n", y); f = 2; p1 = &f; y1 = *p1; printf("f vale %f\n", y1); c = 'a'; p2 = &c; y2 = *p2; printf("c vale %d\n", y2); //system ("pause"); }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.