Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

how to set Nth bit of a variable?

1 Answers  

What are linked lists in c?

0 Answers  

Is there a way to compare two structure variables?

0 Answers  

write a program in c language for the multiplication of two matrices using pointers?

8 Answers   Ignou,

What is difference between Structure and Unions?

0 Answers   TISL,

Write a program which returns the first non repetitive character in the string?

0 Answers   Expedia,

How do you search data in a data file using random access method?

0 Answers  

how can use subset in c program and give more example

0 Answers  

What is 'makefile' in C langauage? How it be useful? How to write a makefile to a particular program?

2 Answers  

Do you know the difference between malloc() and calloc() function?

0 Answers  

how many key words availabel in c a) 28 b) 31 c) 32

0 Answers  

Write a program on swapping (100, 50)

0 Answers   BPL,