what will be the output off the following program?
#include<stdio.h>
int main()
{
int a;
a=015+0*71+5;
printf("%d,a");
return0;
}
Answer Posted / dhaval
the main point of answer is that the whole program will run
without a single damn error as it ignores %d (called the
conversion character) and just print "a" as text.
so the answer will be a.
if we write the printf statement as printf ("%d",a); in this
case it shall print the answer as 18. dont know why it
prints 18. am on my way to discover this problem out. i will
post a new answer if at all i shall find an answer to this query
regards,
Dhaval. (L.j college of computer applications.)
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Differentiate between a for loop and a while loop? What are it uses?
How do I get a null pointer in my programs?
Can we use visual studio for c?
What is a structural principle?
What is the use of linkage in c language?
Is python a c language?
What are the different types of objects used in c?
Can you write the algorithm for Queue?
What is wrong in this statement?
Explain what are preprocessor directives?
What are the types of pointers in c?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
Why is this loop always executing once?
What is c method?
What does the error message "DGROUP exceeds 64K" mean?