what will be the output:
main(){char ch;int a=10;printf("%d",ch);}

Answer Posted / sirajuddin

variable ch is of character type and nothing is assigned
to it where as 'a' is of interger type.

In the printf statement we are placing variable 'ch' along
with %d which will display a garbage value.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

1641


What is wild pointer in c with example?

571


What is the purpose of sprintf?

615


What is difference between stdio h and conio h?

881


What are data types in c language?

578






There seem to be a few missing operators ..

614


What is the purpose of void pointer?

590


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

665


write a program to display all prime numbers

1452


Explain the ternary tree?

598


What is the difference between malloc calloc and realloc in c?

643


Is c is a low level language?

559


What is getch?

630


Why is struct padding needed?

625


Should I learn c before c++?

602