C++ Program to Merge Two Arrays in Order

This is a C++ Program to Merge Two Arrays in Order. Problem Description An array is a collection of elements of the same type placed in contiguous memory locations that can be individually referenced by using an index to a unique identifier. This operation is used to merge two one-dimensional arrays into a third one-dimensional … Read more

advertisement

C++ Program to Perform Bitwise Calculation Using a Menu (4 Bit Numbers)

This is a C++ Program to Perform Bitwise Calculation Using a Menu (4-bit numbers). Problem Description As we know our computer stores everything in the form of bits and it will be very easy for the computer if we work on bits. Bitwise operations are faster and closer to the system and also optimize the … Read more

advertisement

C++ Program to Find if Two Strings are Anagrams

This is a C++ Program to Find if Two Strings are Anagrams. Problem Description The program takes two strings and checks if they are anagrams. An anagram is a phrase formed by rearranging the letters of a different phrase. Problem Solution 1. The program takes two strings. 2. Using a function, the two strings are … Read more

advertisement

C++ Program to Print Each Letter in a String followed by its Frequency

This is a C++ Program to Print Each Letter in a String followed by its Frequency. Problem Description The program takes a string and prints the frequency of each letter in the string. Problem Solution 1. The program takes a string. 2. The number of times a letter occurs in the string is recorded. 3. … Read more

advertisement

C++ Program to Remove the Spaces in a String

This is a C++ Program to Remove the Spaces in a String. Problem Description The program takes a string and removes the spaces in it. Problem Solution 1. The program takes a string. 2. Using a for loop, any spaces found in the string are removed. 3. The result is printed. 4. Exit. C++ Program/Source … Read more

advertisement

C++ Program to Replace all Spaces in a String with %

This is a C++ Program to Replace all Spaces in a String with %. Problem Description The program takes a string and replaces all spaces in it with %. Problem Solution 1. The program takes a string. 2. The string is checked for spaces and replaced with %. 3. The result is printed. 4. Exit. … Read more

advertisement

C++ Program to Accept a Matrix and Interchange the Diagonals

This is a C++ Program to Accept a Matrix and Interchange the Diagonals. Problem Description The program takes a square matrix and interchanges the diagonals. Problem Solution 1. The program takes a square matrix. 2. Using a for loop, the right and left diagonals are interchanged. 3. The result is printed. 4. Exit. C++ Program/Source … Read more

advertisement

C++ Program to Find the second largest/Smallest Number in an Array

This is a C++ Program to Find the second largest/Smallest Number in an Array. Problem Description The program takes an array and finds the second largest/smallest number in it. Problem Solution 1. The program takes an integer array. 2. Using nested for loops, the array is first sorted. 3. Then, the second largest and second … Read more

advertisement

C++ Program to Implement the strchr() Function

This is a C++ Program to Implement the strchr() Function. Problem Description The program implements the function strchr() which takes a string and a character and returns a pointer to location of the latter in the string. Problem Solution 1. The program takes a string and a character. 2. Using a for loop, the character … Read more

advertisement

C++ Program to Implement the strspn() Function

This is a C++ Program to Implement the strspn() Function. Problem Description The program implements the function strspn() which takes two strings and returns the length of portion of first string consisting of characters only from second string. Problem Solution 1. The program takes two strings. 2. Using for loops, both strings are compared. 3. … Read more

advertisement
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn | Youtube | Instagram | Facebook | Twitter