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
Is c weakly typed?
What are the advantages of Macro over function?
Is fortran still used today?
What are bitwise shift operators in c programming?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
Do you have any idea about the use of "auto" keyword?
What is a shell structure examples?
Can main () be called recursively?
How can I insert or delete a line (or record) in the middle of a file?
How can I make sure that my program is the only one accessing a file?
Difference between constant pointer and pointer to a constant.
Can we declare function inside main?
how to find binary of number?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include