Given only putchar (no sprintf, itoa, etc.) write a routine
putlong that prints out an unsigned long in decimal.
Answer Posted / prateek caire
void print(unsigned n)
{
static c = 0;
if( n < 10)
{
putchar(n + 48);
return;
}
int m = n%10;
print(n/10);
if(++c%3 == 0) putchar(',');
putchar(48 + m);
}
Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
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']
Write a routine to implement the polymarker function
What is full form of PEPSI
Cluster head selection in Wireless Sensor Network using C programming language.
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
write a simple calculator c program to perform addition, subtraction, mul and div.
#include
write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30
How can you relate the function with the structure? Explain with an appropriate example.
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
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 ??
write a function to give demostrate the functionality of 3d in 1d. function prototye: change(int value,int indexX,int indexY,int indexZ, int [] 1dArray); value=what is the date; indexX=x-asix indexY=y-axis indexZ=z-axis and 1dArray=in which and where the value is stored??
Sir... please give some important coding questions asked by product companies..
Design an implement of the inputs functions for event mode
why nlogn is the lower limit of any sort algorithm?