main()

{

char *p = “ayqm”;

printf(“%c”,++*(p++));

}

Answers were Sorted based on User's Feedback



main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }..

Answer / krishna kumar

nothing print (blank) .

Is This Answer Correct ?    1 Yes 7 No

main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }..

Answer / mohan

error

Is This Answer Correct ?    3 Yes 10 No

main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }..

Answer / manoj ku. dalai

z

Is This Answer Correct ?    0 Yes 7 No

main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }..

Answer / ravneet kaur

as *p has address of a.and after increment p++ it moves to
y and after ++*(p++) its address is incremented and gets the
another location and gets the value z and value of memory
location is any other value.

Is This Answer Correct ?    6 Yes 14 No

main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }..

Answer / mohan

y

Is This Answer Correct ?    1 Yes 9 No

main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }..

Answer / laxmi bose

q

Is This Answer Correct ?    5 Yes 15 No

main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }..

Answer / pavan

c

Is This Answer Correct ?    7 Yes 21 No

main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }..

Answer / raajdurai

compile error

Is This Answer Correct ?    20 Yes 37 No

main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }..

Answer / marginal

q

Is This Answer Correct ?    4 Yes 25 No

Post New Answer

More C Code Interview Questions

void main() { int k=ret(sizeof(float)); printf("\n here value is %d",++k); } int ret(int ret) { ret += 2.5; return(ret); }

1 Answers  


#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }

2 Answers  


Write a C program to print ‘Campus Force training’ without using even a single semicolon in the program.

3 Answers   Wipro,


main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }

1 Answers  


what is variable length argument list?

2 Answers  






What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }

1 Answers  


main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }

6 Answers  


main() { int a[10]; printf("%d",*a+1-*a+3); }

1 Answers  


main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above

5 Answers   HCL,


main() { int i; clrscr(); for(i=0;i<5;i++) { printf("%d\n", 1L << i); } } a. 5, 4, 3, 2, 1 b. 0, 1, 2, 3, 4 c. 0, 1, 2, 4, 8 d. 1, 2, 4, 8, 16

4 Answers   HCL,


main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }

1 Answers   CSC,


write a origram swaoing valu without 3rd variable

2 Answers  


Categories