A
Akhil
Since a character constant is an int value represented as a character
in single quotes,so it is treated as a 1 byte integer now look at the
following snippet.
#include<stdio.h>
int main(void)
{
char a='Abbc';
printf("%c",a);
return 0;
}
Please explain how the initialization is interpreted,on compilation it
gives a warning "multi-character character constant" but runs without
error also possibly the last character within the single quotes is
being stored in a.
in single quotes,so it is treated as a 1 byte integer now look at the
following snippet.
#include<stdio.h>
int main(void)
{
char a='Abbc';
printf("%c",a);
return 0;
}
Please explain how the initialization is interpreted,on compilation it
gives a warning "multi-character character constant" but runs without
error also possibly the last character within the single quotes is
being stored in a.