what will be the output:
main(){char ch;int a=10;printf("%d",ch);}
Answers were Sorted based on User's Feedback
Answer / bharath s
The answer is Garbage value...
The answer willbe lik -113...Depending upon the compailer
If we declare as..
static char ch;
Then Answer is 0.....
| Is This Answer Correct ? | 21 Yes | 0 No |
Answer / paul
It'll give a warnin tat "a is never used...If u Continue
executing...it will the memory addres that is currently
used.
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / sadasiva
It gives compilation warning but not Error.
While running ,gives Run time check error and prints some
garbage value.
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / anu
I think it will not give any error and it will print some
garbage value.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / manju
The answer is garbage value because ch is not initialised
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / 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 |
Answer / sulagna samapika
what will be the output of printf("%d")
ans-
the outpot is 0
| Is This Answer Correct ? | 2 Yes | 0 No |
without using arithmatic operator convert an intger variable x into x+1
What is data type long in c?
#include main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }
What is cohesion in c?
what is c programing
is forign key will be unique key any table or not?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
write a program for 7*8 = 56 ? without using * multiply operator ? output = 56
print pattern 1 1 33 33 555 555 77777777 555 555 33 33 1 1
Write c-code for 5+55+555+5555+55555+555555+5555555. Output will be it's answer...
Describe wild pointers in c?
What is the use of bitwise operator?