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 |
what are the languages used in c#?
how to print 2-D array using a single for loop?
2 Answers Mind Tree, TCS, Value Labs,
How can I write functions that take a variable number of arguments?
#include<stdio.h> #include<conio.h> void main() { int m=0111,n=20; printf("%d%d\n",m,n); getch(); }
How do you determine a file’s attributes?
What is the use of a conditional inclusion statement in C?
WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW IT COME .. #include<stdio.h> #include<conio.h> void main() { int k=20; printf("%d%d%d%d",k,k++,++k,k); getch(); }
How many types of linked lists what are they? How many types of data structures?
18 Answers BSNL, Pivotal Software,
which is an algorithm for sorting in a growing Lexicographic order
Explain what is a program flowchart and explain how does it help in writing a program?
What are called c variables?
How do we open a binary file in Read/Write mode in C?