Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Test 3
//gcc 5.4.0 #include <stdio.h> #include <string.h> char *p; int *addr; unsigned int array1[]={1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,0}; char array[]="Helloyouguys", x='l'; int i; typedef struct { int a; char b; char array[4]; int dec_array[2]; char terminate; }str; str struct1, *strptr; int main(void) { p=array; for ( i = 0; i < 5; i++ ) { printf("*(p + %d) : %c\n", i, *(p + i) ); } addr=array1; for ( i = 0; i < 5; i++ ) { printf("\n*(addr + %d) : %p\n", i, addr++ ); } printf("\n sizeof(int) is:%d,bytes \n uInt(MAX) is:%u", sizeof(int),0xFFFFFFFF); i=5; printf("\n Priority is:%d", (++i+2)); //----------------------------- Srtr ------------------------------------------------ strptr=&struct1; strptr->a=1198; strptr->b=20; memset(strptr->array, '\0', sizeof(strptr->array)); memset(strptr->dec_array, '\0', sizeof(strptr->dec_array)); strptr->dec_array[2]=1600; strptr->terminate=0; i=0; printf("\n Str address %d (%p), Value:%d", i++, &strptr->a, strptr->a); printf("\n Str address %d (%p), Value:%d", i++, &strptr->b, strptr->b); printf("\n Str address %d (%p), Value:%s", i++, &strptr->array, strptr->array[0]); printf("\n Int address0 %d (%p), Value:%d", i++, &strptr->dec_array, strptr->dec_array[0]); printf("\n Int address1 %d (%p), Value:%d", i++, &strptr->dec_array[1], strptr->dec_array[1]); printf("\n Int address2 %d (%p), Value:%d", i++, &strptr->dec_array[2], strptr->dec_array[2]); printf("\n Str address %d (%p), Value:%d", i++, &strptr->terminate, strptr->terminate); return 0; }
run
|
edit
|
history
|
help
0
Lab 11
Camping
2017_1117_TARTAGLIA
Project 5 v.05
Programação em C, testes
gets.c
abc
función free()
FUNTION3
Media de 3 numeros