Mallika Gupta has Published 19 Articles

Print first and last character of each word in a string

Mallika Gupta

Mallika Gupta

Updated on 31-Jul-2023 17:49:26

580 Views

Introduction A C++ string is contiguous storage of alphanumeric characters as well as special characters. A string has the following properties − Every C++ string is associated with a fixed length. Character operations can be easily performed with the string characters. A string is composed of words, which are ... Read More

Print last character of each word in a string

Mallika Gupta

Mallika Gupta

Updated on 31-Jul-2023 17:46:19

633 Views

Introduction C++ strings are essentially a combination of words used as a storage unit to contain alphanumeric data. The words in a string are associated with the following properties − The word positions begin with 0. Every word is associated with a different length. The characters combine together ... Read More

Pairs of strings which on concatenating contains each character of “string”

Mallika Gupta

Mallika Gupta

Updated on 31-Jul-2023 17:42:45

22 Views

Introduction A stream of characters flowing together collectively comprising of alphanumeric characters as well as special symbols can be termed as a C++ string. String concatenation is an important aspect of the string data structure, since it is used to combine different sub strings or words to form complete sentences. ... Read More

Longest double string of a Palindrome

Mallika Gupta

Mallika Gupta

Updated on 31-Jul-2023 17:39:35

47 Views

Introduction A contiguous sequence of characters, comprising of upper case, lower case, repetitive or unique alphanumeric characters form a C++ string. Every string is recognized by a unique length parameter, which may be odd or even in nature. A palindromic string is the same sequence of characters encountered from both ... Read More

Encrypt a string by repeating i-th character i times

Mallika Gupta

Mallika Gupta

Updated on 31-Jul-2023 17:36:26

60 Views

Introduction A C++ string is a fixed sequence of alphanumeric characters. It is a continuous stream of occurring characters, which may be digits, characters or even special symbols. Every string is characterized by a definite length. The positions by which the characters are accessed begin with 0. Strings can contain ... Read More

Count of strings satisfying the given conditions

Mallika Gupta

Mallika Gupta

Updated on 31-Jul-2023 17:28:44

49 Views

Introduction A string in C++ is also a primitive data type which is comprised of alphanumeric characters. The letters in a string are case sensitive, but strings can contain both upper and lower case. In this article, we are given an input array of lowercase strings, and require the count ... Read More

Count of pairs of strings which differ in exactly one position

Mallika Gupta

Mallika Gupta

Updated on 31-Jul-2023 17:25:32

163 Views

Introduction A string is composed of alphanumeric characters, each of which is associated with a definite position. The positions of the characters range from 0 to the string length. The characters differing exactly in one position are said to be adjacent. In this article, we are going to develop a ... Read More

Count of buttons pressed in a keypad mobile

Mallika Gupta

Mallika Gupta

Updated on 31-Jul-2023 17:11:33

95 Views

Introduction A string in C++ is an in-built storage structure used to contain digits, characters or even special symbols. Every string is associated with a definite size, specified by its length attribute. By default, the string positions begin with 0. The characters in string can be subjected to various types ... Read More

Check if the string contains consecutive letters and each letter occurs exactly once

Mallika Gupta

Mallika Gupta

Updated on 31-Jul-2023 17:07:46

697 Views

Introduction A string in C++ is a sequence of characters, which may be distinct or repetitive in nature. Consecutive characters are the characters occurring simultaneously, with a difference of 1. For instance, the characters a and b are consecutive, since they occur together. However, the characters m and o have ... Read More

Character whose frequency is equal to the sum of frequencies of other characters of the given string

Mallika Gupta

Mallika Gupta

Updated on 31-Jul-2023 17:01:46

62 Views

Introduction A C++ string is a stream of alphanumeric characters. A string has the following properties − A string is composed of a fixed set of characters The strings positions start by default from the 0th index Frequency of any character is the number of times it occurs in ... Read More

Advertisements