Link to home
Start Free TrialLog in
Avatar of Swaminathan_K
Swaminathan_KFlag for India

asked on

Different character when the size increases from 255

Hi All,

Iam new to C programming . Can anyone tell me when I assign a character more then 255 characters to char variable in C, Iam getting a different charctaer when I print it.

Thanks in advance..
ASKER CERTIFIED SOLUTION
Avatar of Zoppo
Zoppo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

What are you assigning to the variable and what is being printed?

Post the code in question and what the output is.
Avatar of Swaminathan_K

ASKER

void main ()
{
char name :='7892';
printf("%c \n",name);
}
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks . I got the answer.