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 ].
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
What is a wrapper function in c?
How do I send escape sequences to control a terminal or other device?
Why doesnt this code work?
How many types of errors are there in c language? Explain
hi send me sample aptitude papers of cts?
What is structure in c definition?
What is main () in c?
Which driver is a pure java driver
write a program to rearrange the array such way that all even elements should come first and next come odd
What does int main () mean?
What is union in c?
How to define structures? ·
What does nil mean in c?