Recent questions tagged array-of-pointers

2 votes
2 answers
36
If $x$ is a one dimensional array, then$^*(x+i)$ is same as $^*(\&x[i])$$\&x[i]$ is same as $x+i-1$$^*(x+i)$ is same as $^*x[i]$$^*(x+i)$ is same as $^*x+i$
0 votes
0 answers
38
0 votes
0 answers
39
Give the output of the following program#include <iostream.h>void main(){int x[]={5,2,6,9,8};int *p, q,*t;p=x;t=x+1;q=&t;cout<<endl<<*++p<<" "<< q<<" "<<*t++;}(a) 1 1 1 1...
6 votes
2 answers
40
int arr [3] ;print(arr -arr[0],arr [0]-arr[0][0])P.s :Sorry i can't able to paste the question but this is main Context.
1 votes
0 answers
43
#include <stdio.h>main(){ int arr[5]; printf("%p,%p\n",arr,&arr);}How do both print the same address?
0 votes
1 answer
44
main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p+++*str1-32); }output is 76 pls explain.
0 votes
0 answers
46
char c = 'Z'; char a[] = "Hello world"; char *ptr1 = &c; char *ptr2 = a; char *ptr3 = &a[0]; char *ptr4 = &a[6]; char *ptr5 = a + 6;Can someone explain this...
2 votes
1 answer
48
0 votes
1 answer
49
Hi,Why multiple dereferencing is not creating problem in the following program ?https://ideone.com/3Li06v (Check line 1,2 & 3. all are giving same O/P)
1 votes
1 answer
51
What is the output of above program?Answer is : 1, 1, 1, 12, 2, 2, 23, 3, 3, 32, 2, 2, 2 3, 3, 3, 34, 4, 4, 4Can anyone explain me those 4 expressions diagrammatically​...
0 votes
1 answer
52
What is the output of the above program?Explanation:(*(*(*p) -2)) = E (*(*(*p)[0]+1)) = A E - A = 4
1 votes
2 answers
55
How to read them??I. int (*a)();II. int (*a[5])();III. int *(*a)();IV. int (*a)()V. int *(*a)[10]