#include<stdio.h>
int main()
{
char name = 'Hannah'; //add [] after variable name to store multiple variables
int age = 20;
printf('Hi Im %c', name);
return 0;
}
I’m a beginner at C and I keep getting an error when I run this code. Can someone help me out?
[Error output][1]
[1]: https://i.stack.imgur.com/fHmPa.png
>Solution :
use char name[] = "Hannah"; instead of char name = 'Hannah';
and printf("%s",str); for display .