hi,
i get an error - 'incompatible types in assignment'
for the following code
#include<stdio.h>
int main()
{
char name[10];
name="Hello";
printf("%s",name);
}
Any help will be greatly appreciated...
hi,
i get an error - 'incompatible types in assignment'
for the following code
#include<stdio.h>
int main()
{
char name[10];
name="Hello";
printf("%s",name);
}
Any help will be greatly appreciated...
You can't assign arrays.
Use strcpy() instead.
Thanks..
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.