char ch="{'H','I',0};printf("%s",ch);what is output

Answer Posted / sathish kumar

Hi All,

this is sathish. upto my knwowledge it depends on
compiler. in TurboC if u give char ch={'AB'}; it will
print B. In VC++ if u give char ch={'ABC'} it will give
C. But in TurboC u cannot give like this char ch={'ABC'};
(three character r nt allowed).

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2378


What are the three constants used in c?

549


What is a double c?

595


Why does not c have an exponentiation operator?

631


How do I convert a string to all upper or lower case?

633






#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1269


What is array of pointers to string?

576


What is the meaning of typedef struct in c?

602


Explain what is page thrashing?

615


Is there anything like an ifdef for typedefs?

708


What is the difference between volatile and const volatile?

572


What is the size of enum in bytes?

594


How to write a code for reverse of string without using string functions?

1583


What is #pragma statements?

595


What is a pointer in c?

685