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
What are the two types of structure?
please send me the code for multiplying sparse matrix using c
How will you delete a node in DLL?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What standard functions are available to manipulate strings?
Why does notstrcat(string, "!");Work?
What does & mean in scanf?
Why is c called a mid-level programming language?
Can we assign integer value to char in c?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
Explain enumerated types.
Why do we write return 0 in c?
What are header files and what are its uses in C programming?
Why is structure important for a child?
Can you define which header file to include at compile time?