C Programming :: Pointers
-
What will be the output of the program assuming that the array begins at the location 1002 and size of an integer is 4 bytes?
#include
int main() { int a[3][4] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; printf("%u, %u, %u\n", a[0]+1, *(a[0]+1), *(*(a+0)+1)); return 0; } -
What will be the output of the program?
#include
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; } -
What will be the output of the program ?
#include
int main() { char *str; str = "%d\n"; str++; str++; printf(str-2, 300); return 0; } -
What will be the output of the program ?
#include
int main() { printf("%c\n", 7["FRESHERGATE"]); return 0; } -
What will be the output of the program ?
#include
int main() { char str[] = "peace"; char *s = str; printf("%s\n", s++ +3); return 0; } -
What will be the output of the program ?
int main() { char *p; p="hello"; printf("%s\n", *&*&p); return 0; }
-
What will be the output of the program assuming that the array begins at location 1002?
#include
int main() { int a[2][3][4] = { {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2}, {2, 1, 4, 7, 6, 7, 8, 9, 0, 0, 0, 0} }; printf("%u, %u, %u, %d\n", a, *a, **a, ***a); return 0; } -
What will be the output of the program ?
#include
-
What will be the output of the program ?
#include
-
What will be the output of the program ?
#include
int main() { int i, n; char *x="Alice"; n = strlen(x); *x = x[n]; for(i=0; i"%s ", x); x++; } printf("\n", x); return 0; }