#include<stdio.h> int main() { int i=3, *j, k; j = &i; printf("%d\n", i**j*i+*j); return 0; }
#include<stdio.h> int main() { char *p; p="hello"; printf("%s\n", *&*&p); return 0; }
#include<stdio.h> int main() { int arr[] = {12, 13, 14, 15, 16}; printf("%d, %d, %d\n", sizeof(arr), sizeof(*arr), sizeof(arr[0])); return 0; }
#include<stdio.h> int main() { int arr[3] = {2, 3, 4}; char *p; p = arr; p = (char*)((int*)(p)); printf("%d, ", *p); p = (int*)(p+1); printf("%d", *p); return 0; }
#include<stdio.h> void fun(void *p); int i; int main() { void *vptr; vptr = &i; fun(vptr); return 0; } void fun(void *p) { int **q; q = (int**)&p; printf("%d\n", **q); }
#include<stdio.h> int main() { int x=30, *y, *z; y=&x; /* Assume address of x is 500 and integer is 4 byte size */ z=y; *y++=*z++; x++; printf("x=%d, y=%d, z=%d\n", x, y, z); return 0; }
#include<stdio.h> int main() { printf("%c\n", 7["CuriousTab"]); return 0; }
#include<stdio.h> int main() { char str[] = "peace"; char *s = str; printf("%s\n", s++ +3); return 0; }
#include<stdio.h> int main() { printf("%d, %d\n", sizeof(NULL), sizeof("")); return 0; }
#include<stdio.h> power(int**); int main() { int a=5, *aa; /* Address of 'a' is 1000 */ aa = &a; a = power(&aa); printf("%d\n", a); return 0; } power(int **ptr) { int b; b = **ptr***ptr; return (b); }
#include<stdio.h> int main() { int i, a[] = {2, 4, 6, 8, 10}; change(a, 5); for(i=0; i<=4; i++) printf("%d, ", a[i]); return 0; } void change(int *b, int n) { int i; for(i=0; i<n; i++) *(b+1) = *(b+i)+5; }
Comments
Copyright ©CuriousTab. All rights reserved.
[url=]methods of restoration of baths[/url]