Posts

Convert number from decimal to binary C++ program { Method 2 }

Another method to convert number from decimal to binary. To read another method then go to link convert number from decimal to binary { Method 1 }

Decimal to binary conversion C++ program { Method 1 }

Image
For the conversion of decimal to binary, what we do. We divide number by 2 until we get 0 and then write the remainders. see the image.

Find the second smallest element in array C Program

Simple C program to find second smallest element in unsorted array. C program to find second minimum element in unsorted array.

Find out second largest element in array C program

Find second largest element in given array. For example if arr is {2,6,3,12,7,9,4} then second largest element is 9 . Our task is find out this element.

Differences between string constant and character constant

Here differences between string constant and character constant.

Differences between declaration and initialization in C/C++

Simple definition of declaration and initialization in C/C++. Both are same in C and C++.

3 Simple C programs to check palindrome string

Simple C Program to check palindrome string or whether string is palindrome or not: To check palindrome, declare a variable flag and initialize it to 1 and then compare first element with last element then second element with second last element and so on.