Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • C++ Data Types
  • C++ Input/Output
  • C++ Arrays
  • C++ Pointers
  • C++ OOPs
  • C++ STL
  • C++ Interview Questions
  • C++ Programs
  • C++ Cheatsheet
  • C++ MCQ
  • C++ Projects
  • C++ Exception Handling
  • C++ Memory Management
Open In App
Next Article:
C Arrays
Next article icon

String C/C++ Programs

Last Updated : 22 May, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

C program to swap two Strings
C Program to Sort an array of names or strings
C Program to Check if a Given String is Palindrome
C/C++ Program for Return maximum occurring character in the input string
C/C++ Program for Remove all duplicates from the input string.
C/C++ Program for Print all the duplicates in the input string.
C/C++ Program for Remove characters from the first string which are present in the second string
C/C++ Program for A Program to check if strings are rotations of each other or not
C/C++ Program for Print reverse of a string using recursion
C/C++ Program for Write a C program to print all permutations of a given string
C/C++ Program for Divide a string in N equal parts
C/C++ Program for Given a string, find its first non-repeating character
C/C++ Program for Print list items containing all characters of a given word
C/C++ Program for Reverse words in a given string
C/C++ Program for Run Length Encoding
C/C++ Program for Find the smallest window in a string containing all characters of another string
C/C++ Program for Searching for Patterns | Set 1 (Naive Pattern Searching)
C/C++ Program for Searching for Patterns | Set 2 (KMP Algorithm)
C/C++ Program for Searching for Patterns | Set 3 (Rabin-Karp Algorithm)
C/C++ Program for Searching for Patterns | Set 4 (A Naive Pattern Searching Question)
C/C++ Program for Length of the longest substring without repeating characters
C/C++ Program for Print all permutations with repetition of characters
C/C++ Program for Print all interleavings of given two strings
C/C++ Program for Check whether a given string is an interleaving of two other given strings
C/C++ Program for Check whether two strings are anagram of each other
C/C++ Program for Searching for Patterns | Set 5 (Finite Automata)
C/C++ Program for Pattern Searching | Set 6 (Efficient Construction of Finite Automata)
C/C++ Program for Pattern Searching | Set 7 (Boyer Moore Algorithm – Bad Character Heuristic)
C/C++ Program for Dynamic Programming | Set 17 (Palindrome Partitioning)
C/C++ Program for Lexicographic rank of a string
C/C++ Program for Print all permutations in sorted (lexicographic) order
C/C++ Program for Longest Palindromic Substring | Set 1
C/C++ Program for An in-place algorithm for String Transformation
C/C++ Program for Longest Palindromic Substring | Set 2
C/C++ Program for Given a sequence of words, print all anagrams together | Set 1
C/C++ Program for Given a sequence of words, print all anagrams together | Set 2
C/C++ Program for Count words in a given string
C/C++ Program for String matching where one string contains wildcard characters
C/C++ Program for Write your own atoi()
C/C++ Program for Dynamic Programming | Set 29 (Longest Common Substring)
C/C++ Program for Remove “b” and “ac” from a given string
C/C++ Program for Dynamic Programming | Set 33 (Find if a string is interleaved of two other strings)
C/C++ Program for Find the first non-repeating character from a stream of characters
C/C++ Program for Recursively remove all adjacent duplicates
C/C++ Program for Rearrange a string so that all same characters become d distance away

C program to find second most frequent character


Next Article
C Arrays

R

rahulsharmagfg1
Improve
Article Tags :
  • C Programs
  • C++ Programs
  • C Language
  • C++
  • cpp-string
  • C-String
  • C++ String Programs
  • C String Programs
Practice Tags :
  • CPP

Similar Reads

  • C Arrays
    An array in C is a fixed-size collection of similar data items stored in contiguous memory locations. It can be used to store the collection of primitive data types such as int, char, float, etc., and also derived and user-defined data types such as pointers, structures, etc. Array DeclarationIn C,
    9 min read
  • Properties of Array in C
    An array in C is a fixed-size homogeneous collection of elements stored at a contiguous memory location. It is a derived data type in C that can store elements of different data types such as int, char, struct, etc. It is one of the most popular data types widely used by programmers to solve differe
    8 min read
  • Length of Array in C
    The Length of an array in C refers to the maximum number of elements that an array can hold. It must be specified at the time of declaration. It is also known as the size of an array that is used to determine the memory required to store all of its elements. In C language, we don't have any pre-defi
    3 min read
  • Multidimensional Arrays in C - 2D and 3D Arrays
    A multi-dimensional array in C can be defined as an array that has more than one dimension. Having more than one dimension means that it can grow in multiple directions. Some popular multidimensional arrays include 2D arrays which grows in two dimensions, and 3D arrays which grows in three dimension
    8 min read
  • Initialization of Multidimensional Array in C
    In C, multidimensional arrays are the arrays that contain more than one dimensions. These arrays are useful when we need to store data in a table or matrix-like structure. In this article, we will learn the different methods to initialize a multidimensional array in C. The easiest method for initial
    4 min read
  • Jagged Array or Array of Arrays in C with Examples
    Prerequisite: Arrays in CJagged array is array of arrays such that member arrays can be of different sizes, i.e., we can create a 2-D array but with a variable number of columns in each row. These type of arrays are also known as Jagged arrays. Example: arr[][] = { {0, 1, 2}, {6, 4}, {1, 7, 6, 8, 9}
    3 min read
  • Pass Array to Functions in C
    Passing an array to a function allows the function to directly access and modify the original array. In this article, we will learn how to pass arrays to functions in C. In C, arrays are always passed to function as pointers. They cannot be passed by value because of the array decay due to which, wh
    3 min read
  • How to pass a 2D array as a parameter in C?
    A 2D array is essentially an array of arrays, where each element of the main array holds another array. In this article, we will see how to pass a 2D array to a function. The simplest and most common method to pass 2D array to a function is by specifying the parameter as 2D array with row size and c
    3 min read
  • How to pass an array by value in C ?
    In C programming, arrays are always passed as pointers to the function. There are no direct ways to pass the array by value. However, there is trick that allows you to simulate the passing of array by value by enclosing it inside a structure and then passing that structure by value. This will also p
    2 min read
  • Variable Length Arrays (VLAs) in C
    In C, variable length arrays (VLAs) are also known as runtime-sized or variable-sized arrays. The size of such arrays is defined at run-time. Variably modified types include variable-length arrays and pointers to variable-length arrays. Variably changed types must be declared at either block scope o
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences