C Programming Code Examples
C > Pyramid Patterns Code Examples
C++ Performs Searching Based on Locality -
Searching based on Locality of Reference and also called Principle of locality. So Depending on the memory access pattern data elements are "reallocated". In general search, 80% time
Replace all Occurrences of a Character in a -
Write a C program to 'Replace all Occurrence' of a character with another in a string using a Function. 'Input a string' from user, store it in some variable say str. Input old character and
Program to Display Alphabets using ASCII -
Printing alphabets in C Programming, is little trick. If you are good at basic data types and literals then this is easy for you. Internally C represent every character using ASCII Code.
A Simple Function in C++ Programming -
A function is block of code which is used to perform a particular task, for example let's say you are writing a "Larger C++ Program", in that program you want to do a particular
Compare two Strings in the C++ language -
Function will return 0, if the strings are equal; return 'negative value', if "string1 is less" than string2 and return "positive value" if string1 is greater than string2. This function 'compares'
Code convert numbers to roman numerals -
Take a decimal number as input. Check if the number is greater than 1000 or 900 or 500 or 400 or 100 or 90 or 50 or 40 or 10 or 9 or 5 or 4 or 1. If it is, then store its equivalent roman...
C Delete all occurrences of Character from -
We have accept one string from the user and "character to be deleted" from the user. Pass these 'two parameters' to function which will "delete all occurrences" of the character from
C++ language has many built-in operators -
Operator is a symbol that is used to perform "mathematical" or "logical" manipulations. +, -, *, /, %, Addition, Subtraction, Division and Multiplication, Modulus, ++, -- Increment and