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

Differentiate between a for loop and a while loop? What are it uses?

681


How do I get a null pointer in my programs?

629


Can we use visual studio for c?

560


What is a structural principle?

649


What is the use of linkage in c language?

623






Is python a c language?

561


What are the different types of objects used in c?

585


Can you write the algorithm for Queue?

1561


What is wrong in this statement?

618


Explain what are preprocessor directives?

636


What are the types of pointers in c?

540


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

1128


Why is this loop always executing once?

623


What is c method?

544


What does the error message "DGROUP exceeds 64K" mean?

738