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

what is a constant pointer in C

874


What is difference between Structure and Unions?

863


What is c language and why we use it?

797


An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above

914


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

893


Explain the properties of union. What is the size of a union variable

916


Is it better to bitshift a value than to multiply by 2?

846


How can I find the modification date and time of a file?

802


GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

855


Subtract Two Number Without Using Subtraction Operator

561


why wipro wase

2033


What is the use of volatile?

820


What are the restrictions of a modulus operator?

835


What do you mean by invalid pointer arithmetic?

821


What is operator precedence?

875