whenever i compile the following code (c language
) it causes my console window to stop working.
#include <stdio.h>
#include <iostream>
int main ()
{ char*p="hello";
char*m;int i;
for (i=0;i<5;i++)
{if (*(p+i) != 'l')
{*(m+i)=*(p+i);}}
puts(m);
system("pause");
return 0;}
i am suppose to omit the alphabet 'l' from "hello" and print the string without any holes using pointers.so i wrote the above code.compiler is dev c++
) it causes my console window to stop working.
#include <stdio.h>
#include <iostream>
int main ()
{ char*p="hello";
char*m;int i;
for (i=0;i<5;i++)
{if (*(p+i) != 'l')
{*(m+i)=*(p+i);}}
puts(m);
system("pause");
return 0;}
i am suppose to omit the alphabet 'l' from "hello" and print the string without any holes using pointers.so i wrote the above code.compiler is dev c++