Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Given only putchar (no sprintf, itoa, etc.) write a routine
putlong that prints out an unsigned long in decimal.

Answer Posted / sanjay

#include<stdio.h>
#include<conio.h>

int main()
{
unsigned long abc=234455787; int div1;
div1=print_int(abc);
getch();
}


int print_int(long val)
{ int div=1; char c;
if (val>=10)
{
div=print_int(val/10);
}
putchar(val%10+48);
return (1);
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you relate the function with the structure? Explain with an appropriate example.

3469


Write a program to model an exploding firecracker in the xy plane using a particle system

4159


write a simple calculator c program to perform addition, subtraction, mul and div.

3739


Develop a routine to reflect an object about an arbitrarily selected plane

3637


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

4550


Cluster head selection in Wireless Sensor Network using C programming language.

3764


write a program for area of circumference of shapes

2584


Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines

3554


could you please send the program code for multiplying sparse matrix in c????

3598


how to test pierrot divisor

2774


Sir... please give some important coding questions asked by product companies..

2291


how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.

2694


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

7004


why nlogn is the lower limit of any sort algorithm?

2868


To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']

1006