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
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
Can you return null in c?
Explain what is the difference between functions abs() and fabs()?
What are the restrictions of a modulus operator?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
main() { printf("hello"); fork(); }
What is the scope of local variable in c?
How do I round numbers?
Is c is a middle level language?
What are static variables in c?
What is return in c programming?
What are the different types of control structures?
How can you tell whether two strings are the same?
What are the different properties of variable number of arguments?
What is return type in c?