- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1453 Articles for C

49 Views
The aim of this article is to implement a program maximum count of characters that can replace? by at most A 0s and B 1s with no adjacent duplicates. Given a couple of integers A and B, both of which that represent the number of 0s and 1s that are accessible, and a string Str with only the special characters "*" and "?" The aim is to determine the greatest number of characters that may be used in the '?' position without causing any neighboring characters to be identical. Example 1 Let us give the input string str = ... Read More

28 Views
The aim of this article is to implement a program to Position the leftmost set bit in a given binary string where all 1s appear at the end. A string of bits is known as a binary string. A binary string is utilized for storing non-traditional data, such as images, as opposed to a character string, which typically holds text data. The quantity of bytes in a binary string determines its length. Binary data, or data that is portrayed in a binary (base-2) version instead of a text (base-10) format, is stored in binary string variables in computer programming. ... Read More

17 Views
The aim of this article is to implement a program to obtain the Lexicographically largest string formed by choosing words from a given Sentence as per given pattern. As we know, a string is a group of characters that ends with the null character "\0" in C programming. Characters from the C String are kept in a character array. The main difference between A string and a character array is that a C string differs from a character array in that it ends with the distinctive character "\0." Example 1 Input: S = “slow and steady”, B = “sdfh” ... Read More

19 Views
The aim of this article is to implement a program to find the count of alphabetic and alphanumeric strings from a given array of strings. As we know, a string is a group of characters that ends with the null character "\0" in C programming. Characters from the C string are kept in a character array. A C string differs from a character array in that it ends with the distinctive character "\0." Input arr[] = {“snmd”, “nej7dnr”, “snmd”, “dltmdj”, “lbwm2p6”} Output 3 2 “snmd”: 2 “nej7dnr”: 1 “dltmdj”: 1 “lbwn2p6”: 1 Explanation The strings ... Read More

18 Views
The aim of this article is to implement a program to obtain the count of sum of “10” subsequences for each 1 in string with A 1s, B 10s and C 0s. Example Let us take the Input: A = 1, B = 2, C = 3 Output obtained here is : 14 Explanation A = 1 denotes. There is a single "1" string, B = 2 denotes, there is a pair of "10" strings, and C = 3 denotes, there is a trio of "0" strings. The string that results from concatenation is "11010000". Five ... Read More

16 Views
The aim of this article is to implement a program to convert a string Str1 to Str2 by moving B to right and A to left without crossover. As we know, a string is a group of characters that ends with the null character "\0" in C programming. Characters from the C String are kept in a character array. A C string differs from a character array in that it ends with the distinctive character "\0". Example Let us take the input strings, str1 = “#B#A#”, and str2 = “##BA#” Output obtained here is: Yes Explanation − 'B' ... Read More

34 Views
The aim of this article is to implement a program C Program To Write Your Own atoi(). Before we begin, let us take a deeper understanding of what an atoi() function is all about. This will help in writing the program as well as understanding the concepts pretty much easier. To the ones who are not much aware of what an atoi() function is. Here you go. The atoi() function changes a string of elements into an integer value. The string that is entered is a string of characters that has the potential to become a numeric value of the ... Read More

6K+ Views
In concurrent programming, concurrency represents a pivotal concept necessary to comprehend fully how such systems operate. Among the various challenges encountered by practitioners working with these systems stands out the producer-consumer problem - one of the most renowned synchronization issues. In this text, our objective consists of analyzing this topic and highlighting its significance for concurrent computing while also examining possible solutions rooted within C. Introduction In concurrent systems, multiple threads or processes may access shared resources simultaneously. The producer-consumer problem involves two entities: producers that generate data or tasks, and consumers that process or consume the generated data. The ... Read More

1K+ Views
Introduction Named pipes, also referred to as FIFOs (First In, First Out), constitute essential IPC systems in software systems. They offer a quick and effective method for successfully transferring information between processes. Specialized kinds of files known as named pipes serve as a means for interaction among unconnected procedures that operate on an identical structure as well as on separate ones. First-in, first-out (FIFO) named pipes ensure that information composed to the line by a single procedure is read from the pipe by another course in the identical order. Therefore, They are particularly advantageous when processes must communicate independently without ... Read More

160 Views
A palindrome is a string that is just equal to the reverse of it. We are given a string and we have to find the minimum number of insertions of any characters required to make the given string as the palindrome. We will see the three approaches: first recursive approach, then we will memorize this solution, and last, we will implement the dynamic programming approach. Recursive ApproachExample #include // library for input and output #include // library to get the integer limits #include // library for strings // function to find the minimum of ... Read More