#include<string.h>
int main()
{
printf(strcat("www.newtech4u.co.cc","!");
return 0;
}
Yes ,it will definitely work. and display output as
www.newtech4u.co.cc!*. strcat function concatenate the two string.
- strcat(string,"!"); will work because ! is enclosed within double quotes and it is considered as string.
- strcat(string,'!'); will not work because ! is enclosed within the single quotes,it is considered as character.