Print an integer using only putchar. Try doing it without using extra storage.

`void print_to_int(int x)`

{

if(x <=9)

{putchar(x+'0');

return;

}

else

print_to_int(x/10);putchar(x%10+'0');

}

Advertisements

Print an integer using only putchar. Try doing it without using extra storage.

`void print_to_int(int x)`

{

if(x <=9)

{putchar(x+'0');

return;

}

else

print_to_int(x/10);putchar(x%10+'0');

}

Advertisements

This entry was posted on June 22, 2007, 8:10 pm and is filed under Programming. You can follow any responses to this entry through RSS 2.0. You can leave a response, or trackback from your own site.

- Leave a comment

## Search

## Recent Posts

- How to sort a singly linked list?
- How to insert a node in a sorted linked list?
- How to insert a node after a specified node in a linked list?
- How to insert a node in a linked list recursively?
- Deleting a node from doubly linked list
- What are Doubly Linked Lists?
- How to delete a specified node from a Linked List?
- Sorting and Reversing a Linked List
- Now its time for Blackberry Playbook
- How to implement a linked list?
- How to count number of nodes in a Binary Search Tree?
- Fascinated by the Beautiful Universe
- How to search in a Binary Search Tree?
- What is Binary Search Tree?
- What is a Binary Tree?
- What are Trees?
- Remote Desktop App for iPad
- Essential iPad Applications
- Saturn – Beautiful Planet
- Binary Search Tree Traversal
- Samsung Galaxy vs Apple iPad
- iPad Applications, They rock.
- Identical Binary Search Trees?
- How to get Mirror Image of a Binary Search Tree?
- How to delete minimum node from a Binary Search Tree?
- How to insert a node in Binary Search Tree?
- Floyd Warshall Algorithm!
- Longest path!
- Threaded binary Trees !!
- Kopete and Latex
- Merging two sorted linked lists !!
- all about binary tree !!
- Pirates !
- Why nine minutes?
- putchar to int!
- Level order traversal!
- Linux and Women!
- Programmers and HR !
- Debian made easy!!
- Cool Computer programs!!

## World’s Largest Collection of Quotes – AfunZ

## Online Shopping: Carrymart.com

## Introduction to Algorithms by Thomas S. Coremen – A must have book

## Mobile Game Development

## Top Posts

## Blog Stats

- 139,338 hits

#### Recent Posts

- How to sort a singly linked list?
- How to insert a node in a sorted linked list?
- How to insert a node after a specified node in a linked list?
- How to insert a node in a linked list recursively?
- Deleting a node from doubly linked list
- What are Doubly Linked Lists?
- How to delete a specified node from a Linked List?
- Sorting and Reversing a Linked List
- Now its time for Blackberry Playbook
- How to implement a linked list?
- How to count number of nodes in a Binary Search Tree?
- Fascinated by the Beautiful Universe
- How to search in a Binary Search Tree?
- What is Binary Search Tree?
- What is a Binary Tree?

#### World’s Largest Collection of Quotes

%d bloggers like this: