what will be the output:
main(){char ch;int a=10;printf("%d",ch);}
Answers were Sorted based on User's Feedback
Answer / vignesh1988i
garbage ascii value corresponding to the characterr present
in the memory location ch;
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / manjot singh
It will gve a garbage value becoz ch has not value it will
automtically generate value by complier
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / amala v
It'll give a warning tat "a is never used...If u Continue
executing...it will the memory address that is currently
used.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / lnk
In the above coding ...
there is a char "ch " assigned with out a value
and a int" a " assigned with a value ...
and it compiles to print a interger (%d) ...
but tries to read a int value fronm ch (which does not
match the data type ) so it gives garbage value .with
compile time warning !
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / kalpana.y
There will be no output
because,in printf statement the integer variable is
declared but 'ch' is assinged.it should be 'a' insted
of 'ch'.
| Is This Answer Correct ? | 5 Yes | 5 No |
Answer / raghu
I think it prints some garbage value. if ch was initialised
then it would have printed the ASCII value of that charecter
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / balaji
warning! "a" is assigned a value that is never used
| Is This Answer Correct ? | 0 Yes | 0 No |
Can a pointer be volatile in c?
What is the difference between mpi and openmp?
Write a program in C for showing working of different logical operator in C. Your program should guide users with proper message/menu on the console.
What is calloc()?
how can i print "hello".please consider inverted commas as well.i want to print on console: "hello"
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What is floating point exception error? And what are different types of errors occur during compile time and run time? why they occur?
What is else if ladder?
Write a c code segment using a for loop that calculates and prints the sum of the even integers from 2 to 30, inclusive?
What oops means?
How to avoid structure padding in C?
dynamically allocate memory for linear array of n integers,store some elements in it and find some of them