Recent questions tagged pointers

0 votes
0 answers
121
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...
1 votes
0 answers
122
0 votes
1 answer
124
++*p and (*p)++both are same????
0 votes
1 answer
128
0 votes
0 answers
130
0 votes
2 answers
131
what is the difference between*(ptr)++ and ptr++ where char *ptr="gateoverflow"
1 votes
1 answer
132
consider the two declarationsvoid *voidPtr;char *charPtr;which of the following assignments are syntactically correct?(a)charPtr= voidPtr(b)*charPtr=voidPtr(c)*voidPtr=*c...
0 votes
1 answer
133
13 votes
8 answers
135
1 votes
0 answers
136
#include<stdio.h>int main(){char A[5][7][6];char *p[5][7][6];printf("%d\t", (unsigned)(A+1)-(unsigned)A);printf("%d", (unsigned)(p+1)-(unsigned)p);}What will be the outpu...
0 votes
1 answer
137
What is a variable pointer? please note the question is not asking about pointer variables, but the specific term.
1 votes
2 answers
138
What are the minimum number of pointers required to implement a stack using single ended queue ( the queue is NOT a dequeue )?
0 votes
0 answers
139
int main(){int arr[3]={2,3,4};char *p;p = (char*)arr;printf("%d",*p);p=p+1;printf("%d",*p);return 0;}
0 votes
1 answer
140
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
3 answers
141
Int A[3]={0,1,2}A++; For this code snippet un C will there be a compilation error,if yes then please explain a bit.
0 votes
2 answers
142
#include <stdio.h main() { char *p = "Sanfoundry C-Test"; p[0] = 'a'; p = 'b'; printf("%s", p); }
0 votes
2 answers
143
What is the value of the following expression? main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); } (A) 1 1 (B)1 2 (...
1 votes
1 answer
144
Can anyone please verify whether I have calculated the addresses correctly or not?
0 votes
1 answer
148
Declare a function prototype which will do1)recives two integer and float2)return address of array of integers.Please also explain it
1 votes
1 answer
150
"If a string constant is given then through by a pointer we can access the characters but we can't change any of the characters"Can someone please expain this?