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 main fn and semicolon,print remainder for a given number in C language
Tell me about low level programming languages.
Can we access RAM? How? Whats the range of access? Similarly What are other hardware we can access?
Write a C program in Fibonacci series.
Write a program that accept anumber in words
Find MAXIMUM of three distinct integers using a single C statement
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
What are the application of void data type in c?
What are the functions to open and close the file in c language?
Why is c platform dependent?
How can I write a function that takes a format string and a variable number of arguments?
What is p in text message?