main()

{

char *p;

int *q;

long *r;

p=q=r=0;

p++;

q++;

r++;

printf("%p...%p...%p",p,q,r);

}



main() { char *p; int *q; long *r; p=q=r=0; ..

Answer / susie

Answer :

0001...0002...0004

Explanation:

++ operator when applied to pointers increments address
according to their corresponding data-types.

Is This Answer Correct ?    8 Yes 3 No

Post New Answer

More C Code Interview Questions

write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"

2 Answers  


Write a routine to implement the polymarker function

0 Answers   TCS,


Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange

0 Answers  


#include<stdio.h> 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); }

2 Answers   CNSI,


Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.

1 Answers   Samar State University,






Is the following code legal? struct a { int x; struct a *b; }

2 Answers  


void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }

1 Answers  


main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above

5 Answers   HCL,


All the combinations of prime numbers whose sum gives 32

1 Answers   HHH,


struct point { int x; int y; }; struct point origin,*pp; main() { pp=&origin; printf("origin is(%d%d)\n",(*pp).x,(*pp).y); printf("origin is (%d%d)\n",pp->x,pp->y); }

1 Answers  


main() { char *str1="abcd"; char str2[]="abcd"; printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd")); }

1 Answers  


main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }

2 Answers   Adobe, CSC,


Categories