C Programming Code Examples
C > Strings Code Examples
Program to Count Number of Words in a given Text or Sentence
Number of days in a Month by switch case -
C Program to Input month number and Print Total Number of Days in Month using switch case. Input month number from user. Store it in some variable say month. Switch the value
Compute to difference between two dates -
C Programming code sample to compute difference between two dates. Enter first day, month, year. No. of days of first date from the Jan 1. Count for additional days due to...
Code Finds the Sum of 2 Binary Numbers -
Take two Binary Numbers as input. Add each bits from the two binary numbers separately starting from LSB. The operations may be as follows. a) (0+0)=0, b) (1+0)=1, c) (1+1)=0 and
Overridings Non-Virtual Functions in C++ -
See that problem. Even though we have the parent class pointer pointing to the instance of child class, the parent class version of the function is invoked. You may thinking why I
Check Whether the Number is Palindrome -
If the reversed integer is equal to the integer then, that number is a palindrome if not that number is not a palindrome. In program, use is asked to enter a 'positive number' which is
The C++ Language Interchange Numbers -
C++ sample program ask to the user to enter two number (value of A and B) to interchange and "display the result" on the screen: In C++, to "interchange the numbers", enter the two
How to Call Overridden Functions in C++ -
As we have seen above that when we make the 'call to function' (involved in overriding), the child class function (overriding function) gets called. what if you want to call the C++
C Programming Language Mode Program -
C In Statistics Maths, a mode is a value that occurs the highest numbers of time. Example assume a set of values 8, 5, 4, 7, 8. mode of this value set is 8 as it appears more than any