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


Please Help Members By Posting Answers For Below Questions

Is c weakly typed?

580


What are the advantages of Macro over function?

1207


Is fortran still used today?

605


What are bitwise shift operators in c programming?

648


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

767






Do you have any idea about the use of "auto" keyword?

666


What is a shell structure examples?

592


Can main () be called recursively?

631


How can I insert or delete a line (or record) in the middle of a file?

576


How can I make sure that my program is the only one accessing a file?

680


Difference between constant pointer and pointer to a constant.

614


Can we declare function inside main?

571


how to find binary of number?

3442


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

638


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...

4906