# C Programming Code Examples

## C > For Loops and While Loops Code Examples

### C program to swap first and last digit of a number

C Concats Two Strings without Use Library -
We have to accept '2 Strings' from user using gets and we have to 'Concatenate' these two strings without using library functions. Inside the concate function we are firstly calculating

Print Natural Number in Reverse in Range -
Logic to print Natural Number in reverse in a given range. If you got above logic, then you can easily modify to print natural numbers in reverse in given range. We need to make two

If Else Check Given Integer is Odd or Even -
The if...else statement executes some code if the test expression is true (nonzero) & some other code if the test expression is false (0). If test expression is true, codes inside the body

Program code to Reverse a Given Number -
Take the Number which you have to Reverse as the input. Obtain its quotient & remainder. Multiply the separate variable with 10 & add the obtained remainder to it. Do step 2 again

What is The Function Overloading in C++ -
Code sample about C++ language Function overloading. If a "C++ Class" have multiple member functions, having the same name but different parameters and programmers

C++ Program Check if it is a Sparse Matrix -
This is a C++ Program code to check 'sparsity' of a matrix. If the number of zeros in a matrix exceeds (n*m)/2, n and m is the dimension of the matrix, matrix is sparse matrix. Enter the

Enter Week Number & Prints Day of Week -
C language program input week number(1-7) & print the corresponding day of week name using if else. Input week day number. Store it in some variable say week. And print Monday

C Program convert Decimail nos to Roman -
Convert decimail nos to roman equivalent upto 10,000. Function for generating roman equivalent of 1000's. Function for generating roman eq of 100's. Function for generating...