Php Programming Code Examples
Php > Strings Code Examples
Short text sample from long text articles
Code to find Sum of Digits using recursion -
Write a Recursive Function in C Language to calculate sum of digits of a number. Declare Recursive Function to find sum of digits of a number. First give a meaningful name to the
Find the Frequency of Substring in Strings -
Take a string and a substring as input. Store it in the arrays 'str[] & str1[]' respectively. Using For Loop to 'compare' str1[] with the str[]. Do step2 until the end of main string. During the
Convert Uppercase Character to lowercase -
To convert "from uppercase to Lowercase" in 'C++', enter character in uppercase to convert it into 'Lowercase' and display the equivalent character in lowercase. To change uppercase
C Codes Pointer to Pointer Double Pointer -
In C, A "Pointer" holds the Address of another variable of same type. When a Pointer Holds the address of another pointer then such type of pointer is known as "pointer-to-pointer" or
Program to Calculate Average of Numbers -
Takes n number of element from user (where, n is specified by user), stores data in an array and calculates the average of those numbers, program calculates the average if the number
C code to Check and Read Identity Matrix -
C program to read elements in a matrix and check whether matrix is an Identity matrix or not. Identity matrix is a special square matrix whose main diagonal elements is equal to 1
C++ Programming Finds Length of Strings -
To find the length of the string in 'C++', ask to enter the string and then Find the Length the that string using function "strlen()" of string.h library and display the length value of a string
Code find maximum using ladder if.else.if -
Instead of using Nested If Else. Lets combine 2 or more conditions together using Logical Operators. A number j1 among 3 numbers j1, j2 and j3 is said maximum if j1 > j2 and j1 > j3.