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

Answers were Sorted based on User's Feedback



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

Answer / prasath

thats error

Is This Answer Correct ?    2 Yes 0 No

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

Answer / punith

error

Is This Answer Correct ?    2 Yes 0 No

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

Answer / reddy

segmentation fault

Is This Answer Correct ?    2 Yes 1 No

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

Answer / vaibhav

it gives an error becoz of " .
if we ignore him then o/p will be HI .

Is This Answer Correct ?    1 Yes 0 No

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

Answer / vijay

h

Is This Answer Correct ?    0 Yes 0 No

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

Answer / 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

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

Answer / vignesh1988i

first of all the character initilization itself will give an error. since 0 is not provided with single codes. if we neglect that error or we correct the above error. the final output will be 0

Is This Answer Correct ?    0 Yes 0 No

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

Answer / kalpana.y


There will be no output
because,in char function the total values should be given
in invited comas i.e,

ch={"H,I,O"};

Is This Answer Correct ?    0 Yes 1 No

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

Answer / vignesh1988i

it will print hi...

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

how can use subset in c program and give more example

0 Answers  


Given a string write a program to print all alphabetical characters in the order of their occurance first,followed by the sum of the numeric characters then followed by the special characters in the order of their occurance.

1 Answers   College School Exams Tests, Wipro,


write a c program that prints all multiples of 3between 1 and 50.

5 Answers  


Explain what are reserved words?

0 Answers  


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

0 Answers  






What are header files in c programming?

0 Answers  


1) int main() { unsigned char a = 0; do { printf("%d=%c\n",a,a); a++; }while(a!=0); return 0; } can anyone please explain the explain the output

2 Answers  


Not all reserved words are written in lowercase. TRUE or FALSE?

0 Answers  


Write a program to use switch statement.

0 Answers   Agilent, Integreon, ZS Associates,


Are pointers integer?

0 Answers  


1,1,5,17,61,217,?,?.

3 Answers   Apple,


Difference between malloc() and calloc() function?

0 Answers  


Categories