1,285 views
0 0 votes
#include <stdio.h>
int main()
{
    int a[] = {50, 60, 10, 30, 40, 20 };
    int *b[] = {a+3, a+4, a, a+2, a+1, a+5 };
    int **c = b;
    c++;
    printf("%u, %u, %u\n", c-b, *c - a, **c);
    return 0;
}

1 Answer

Position:
Show:

Related questions

0 0 votes
1 answers 1 answer
957
957 views
Desert_Warrior asked May 16, 2016
957 views
#include<stdio.h #include<stdlib.h int main() { char s[] = "Opendays2012"; int i = 0; while(*(s++)) i++; printf("%d",i); return 0; }(a) Segmentation Fault (b) Compile Err...
0 0 votes
0 0 answers
820
820 views
Desert_Warrior asked May 16, 2016
820 views
#include <stdio.h void foo(int[][3]); int main(void) { int a[3][3] = { {1, 2, 3}, {4, 5, 6}, {7, 8, 9} }; foo(a); printf("%d\n", a ); return 0; } void foo(int b[][3]) { ...
1 1 vote
1 answers 1 answer
2.9k
2.9k views
Desert_Warrior asked May 16, 2016
2,853 views
#include<stdio.h void foo(char *); int main() { char *string = "Hello"; foo(string); printf("%s",string); return 0; } void foo(char *a) { while(*a) { *a += 1; a++; } }(a)...
0 0 votes
1 1 answer
731
731 views
Desert_Warrior asked May 16, 2016
731 views
#include <stdio.h int main(void) { char a[5] = { 1, 2, 3, 4, 5 }; char *ptr = (char*)(&a + 1); printf("%d %d\n", *(a + 1), *(ptr - 1)); return 0; }options are : (a) Compi...