c - How to change a pointed value and increment the pointer at the same time -


char foo[] = "something"; char *p = foo; 

is there way change value pointed , increment pointer next element using 1 ;?

i mean, make effect of these 2 lines below in single statement?

 *p = 's';  p++; 

i think want

*p++ = 's'; // -->   *(p++) = 's'; 

sample run.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -