Given only putchar (no sprintf, itoa, etc.) write a routine
putlong that prints out an unsigned long in decimal.
Answer Posted / rakesh
void main()
{
unsigned long n;
int i;
void putlong(unsigned long);
cout<<"\nEnter the number::";
cin>>n;
putlong(n);
}
void putlong(unsigned long n)
{
if(n==0)
return;
print(n/10);
putchar((n%10) + 48);
}
Is This Answer Correct ? | 2 Yes | 10 No |
Post New Answer View All Answers
What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql
How to palindrom string in c language?
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??
How can I Create a C program in splitting set of characters to specific subsets. Example: INPUT SET OF CHARACTERS: Therefore, my dear brothers and sisters, stand firm. Let nothing move you. Always give yourselves fully to the work of the Lord, because you know that your labor in the Lord is not in vain. SPLIT INTO HOW MANY CHARACTERS PER SUBSETS: 10 OUTPUT: Therefore, my dear b rothers an d sisters, stand fir m. Let not hing move you. Alway s give you rselves fu lly to the work of t he Lord, b ecause you know that your labo r in the L ord is not in vain.
How can you relate the function with the structure? Explain with an appropriate example.
What is full form of PEPSI
#include
What is data _null_? ,Explain with code when u need to use it in data step programming ?
What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?
Cluster head selection in Wireless Sensor Network using C programming language.
could you please send the program code for multiplying sparse matrix in c????
how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns
can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?