Thread: a char is i byte and int is 4 byte then how does char a='Z' work
i not clear simple situation
that use assign z a.code:char a='z';
question
and z integer value 4 bytes.then how cancode:sizeof(a) gives 1
statement works.code:char (1 byte)='z'(4 bytes)
the above code give outputcode:#include<stdio.h> int main (){ char c='a'; printf("%d %d", sizeof(c),sizeof('a')); }
code:1 4
i'm kind of new programming... doesn't character variable act pointer address of data is? perhaps explaination...i'm not sure... in case i'm wrong or plain stupid i'm ready whiplash
![]()
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk a char is i byte and int is 4 byte then how does char a='Z' work
Ubuntu
Comments
Post a Comment