what will be the output:
main(){char ch;int a=10;printf("%d",ch);}
Answer Posted / 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 |
Post New Answer View All Answers
What is the difference between void main and main in c?
Explain what is wrong in this statement?
Explain how do you search data in a data file using random access method?
What is difference between far and near pointers?
What is bubble sort technique in c?
What does %d do?
What is the benefit of using an enum rather than a #define constant?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
Do you know what are the properties of union in c?
What are variables and it what way is it different from constants?
What is the difference between the expression “++a” and “a++”?
How can I open a file so that other programs can update it at the same time?
What is 'bus error'?
How can you read a directory in a C program?
Explain what are reserved words?