Discuss anything here - everything that you wish to discuss with fellow engineers.
Join this group to post and comment.
squeeze ur brain
what is the o/p:
i guesso/p will be 2 and 1since printf executes 4m left to right ..sizeof('a') =1 byte..sizeof a char and sizeof(a)=2 bytes
ish_naliniwhat is the o/p:
answer is architecture dependant.
sizeof (datatype) are always architecture dependant.... unless you use virtual machines like JVM.
yeah pad is right this gotta depend on compiler and architecture
i think it would be 2 and 1...for int 2bytes and for char 1 byte...that also depends on the architecture of ur system
we cant write sizeof() inside printf .so it 'll give error
the answer wud be
according 2 me the answer wud be 1 1 & also there is no need to give char a='a' ,we can simply give char a coz thats not making any difference basically.
the answer will be 1 and 1 too.and we can write sizeof() in printf their will be no error.