Write c-code for 5+55+555+5555+55555+555555+5555555.
Output will be it's answer...
Answer Posted / vinod
main()
{
long int f=0,ans=0;
for(int i=0;i<7;i++)
{
f=f*10+5;
ans+=f;
}
printf("%ld",ans);
}
Is This Answer Correct ? | 46 Yes | 12 No |
Post New Answer View All Answers
Is it possible to execute code even after the program exits the main() function?
Why structure is used in c?
Dont ansi function prototypes render lint obsolete?
What is the significance of c program algorithms?
What is the difference between if else and switchstatement
What are the types of pointers?
What are identifiers and keywords in c?
Describe the order of precedence with regards to operators in C.
What is console in c language?
how is the examination pattern?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
to find the closest pair
Explain bitwise shift operators?
Function calling procedures? and their differences? Why should one go for Call by Reference?
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above