*in turbo c:
output is b
as post increment operator will increment later..*
Thanking you
*With regards-
Raghav garg
Contact no. 9013201944
www.facebook.com/rock.raghavag
B. tech (IT), 5th sem
University School Of Information Technology
Guru Govind Singh Indraprastha University
Delhi*
On Thu, Oc
Shiva is right and that is the answer
*
if you try to change the values in a character array literal, the behavior
is undefined*
so on some compilers like Turbo C u may get o/p
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this g
output= b
try running on turbo c .
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For mor
check this :
https://www.securecoding.cert.org/confluence/display/seccode/STR30-C.+Do+not+attempt+to+modify+string+literals
On Thu, Oct 6, 2011 at 9:40 PM, Neha Gupta wrote:
> its not an error
> infact pre-increment operator doesnt hv an impact in changing the value of
> const stringdats y t
its not an error
infact pre-increment operator doesnt hv an impact in changing the value of
const stringdats y the o/p is "a"
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
here
*char *p = "ayqm";
p points to constant character string
so ++*(p++) is an attempt to modify the string so its an error
*
On Thu, Oct 6, 2011 at 8:35 AM, praneethn wrote:
> *int main()
>
> {
>
> char *p = "ayqm";
>
> printf("%c",++*(p++));
> return 0;
>
> }