Recent questions tagged pointers

0 votes
1 answer
121
#include<stdio.h void fun(int *p,int *q) { p=q; *p=q; } int i=0,j=1; int main() { fun(&i,&j); printf("%d%d",i,j); }What will be the output of i and j in 16-bit C Compiler...
0 votes
0 answers
122
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
123
0 votes
1 answer
125
++*p and (*p)++both are same????
0 votes
1 answer
129
0 votes
0 answers
131
0 votes
2 answers
132
what is the difference between*(ptr)++ and ptr++ where char *ptr="gateoverflow"
1 votes
1 answer
133
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
134
13 votes
8 answers
136
1 votes
0 answers
137
#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
138
What is a variable pointer? please note the question is not asking about pointer variables, but the specific term.
1 votes
2 answers
139
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
140
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
141
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
142
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
143
#include <stdio.h main() { char *p = "Sanfoundry C-Test"; p[0] = 'a'; p = 'b'; printf("%s", p); }
0 votes
2 answers
144
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
145
Can anyone please verify whether I have calculated the addresses correctly or not?
0 votes
1 answer
149
Declare a function prototype which will do1)recives two integer and float2)return address of array of integers.Please also explain it