Given only putchar (no sprintf, itoa, etc.) write a routine
putlong that prints out an unsigned long in decimal.
Answer Posted / raghuram.a
#include <stdio.h>
#include<conio.h>
void putlong(unsigned long x)
{
if (x>=10)
{
putlong(x/10);
}
putchar(x%10+48);
}
main()
{
unsigned long a;
clrscr();
printf("enter long integer:");
scanf("%ld",&a);
putlong(a);
getch();
return 0;
}
Is This Answer Correct ? | 12 Yes | 0 No |
Post New Answer View All Answers
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
#include
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 to palindrom string in c language?
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00
Write a program to model an exploding firecracker in the xy plane using a particle system
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 ?
How can you relate the function with the structure? Explain with an appropriate example.
Design an implement of the inputs functions for event mode
write a program for area of circumference of shapes
why nlogn is the lower limit of any sort algorithm?
Hi, i have a project that the teacher want a pyramid of numbers in C# or java...when we click a button...the pyramid should be generated in a listbox/or JtextArea...and the pyramid should have the folowing form: 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 Plz help with codes...didn't find anything on the net.
write a simple calculator c program to perform addition, subtraction, mul and div.
how to test pierrot divisor
Cluster head selection in Wireless Sensor Network using C programming language.