K
karthikbalaguru
Hi,
I am using Visual C++ 2008 Express edition.
The code is building well, but while execution,
it states that 'A problem caused the program
to stop working correctly. Windows will close
the program and notify you if a solution is
available'
But, i expected the output of 'x1z', but
i did not get that output.
Strange !!
Where is the problem in the below code?
#include<stdio.h>
int main(void)
{
char *a[3]={"def","xyz","qrs"};
*(a[1]+1)='1';
printf("%s",a[1]);
return 0;
}
Thx in advans,
Karthik Balaguru
I am using Visual C++ 2008 Express edition.
The code is building well, but while execution,
it states that 'A problem caused the program
to stop working correctly. Windows will close
the program and notify you if a solution is
available'
But, i expected the output of 'x1z', but
i did not get that output.
Strange !!
Where is the problem in the below code?
#include<stdio.h>
int main(void)
{
char *a[3]={"def","xyz","qrs"};
*(a[1]+1)='1';
printf("%s",a[1]);
return 0;
}
Thx in advans,
Karthik Balaguru