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 |
Ca some one please help me with aC code to allow user enter numbers from 1 to 20 without repeating and prnt the sum of those numbers thnx
Write a program in c to print 1 121 12321 1234321 123454321
11 Answers ANR, College School Exams Tests, Mu Sigma, Wipro,
how we can say java is platform independent, while we require JVM for that particular Operating System?
What is the general form of a C program?
write a program to print calender using for loop.
what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; a.9 b.8 c.6 d.7
in which language c language is written?
What do you mean by team??
Explain how do you list files in a directory?
Is that possible to store 32768 in an int data type variable?
Write a program to find given number is even or odd without using any control statement.
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol