Assignment Day-8

 

 1. Write a C function "reverse Integer(int n)", that returns the reverse of n, that is the returned integer (in decimal) contains the same decimal digits as n, but in reverse order. Write a complete C program to test the function.

2. Write a C function "stringLength(char src[])" that finds and returns the length of the null terminated string src[], that is, the number of characters (excluding the null character) in the parameter src[].

3. Write a C function that takes a decimal number and base as argument and returns the equivalent number of the given base.

4. Write a C function to reverse every word of a given string. As, for example, if the input string is 'C Programming Class' output string will be 'C gnimmargorP ssalC'.

5. Write a program to calculate sum of first 20 natural numbers using recursive function.

 

Comments

Popular Posts