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

What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }

1 Answers  


plz send me all data structure related programs

2 Answers  


void ( * abc( int, void ( *def) () ) ) ();

1 Answers  


main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }

1 Answers  


#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?

1 Answers   Wipro,






How to palindrom string in c language?

6 Answers   Google,


main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }

1 Answers  


How can you relate the function with the structure? Explain with an appropriate example.

0 Answers  


struct aaa{ struct aaa *prev; int i; struct aaa *next; }; main() { struct aaa abc,def,ghi,jkl; int x=100; abc.i=0;abc.prev=&jkl; abc.next=&def; def.i=1;def.prev=&abc;def.next=&ghi; ghi.i=2;ghi.prev=&def; ghi.next=&jkl; jkl.i=3;jkl.prev=&ghi;jkl.next=&abc; x=abc.next->next->prev->next->i; printf("%d",x); }

1 Answers  


¦void main() ¦{ ¦int i=10,j; ¦ j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-30 but in same question if we write as- ¦void main() ¦{ ¦int i=10; ¦ int j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-33 why output is changed from 30 to 33. Can any body answer...

3 Answers  


How we print the table of 3 using for loop in c programing?

7 Answers  


C statement to copy a string without using loop and library function..

2 Answers   Persistent, TCS,


Categories