strchr function in c++
C++
// CPP program to demonstrate working of strchr()
#include <iostream>
#include <cstring>
using namespace std;
// Driver code
int main()
{
char str[] = "My name is Ayush";
char ch = 'A', ch2 = 'z';
if (strchr(str, ch) != NULL)
cout << ch << " "
<< "is present in string" << endl;
else
cout << ch << " "
<< "is not present in string" << endl;
if (strchr(str, ch2) != NULL)
cout << ch2 << " "
<< "is present in string" << endl;
else
cout << ch2 << " "
<< "is not present in string" << endl;
return 0;
}
Also in C++:
- Title
- unordered_map c++ insert
- Category
- C++
- Title
- what is atoi in strinf
- Category
- C++
- Title
- subarray sum in c++
- Category
- C++
- Title
- pop_back
- Category
- C++
- Title
- maximum subarray sum equal with K in c++
- Category
- C++
- Title
- how to delete an element in vector pair in cpp
- Category
- C++
- Title
- fast input output in c++
- Category
- C++
- Title
- c++ cli convert string to string^
- Category
- C++
- Title
- how to switch to another branch in git
- Category
- C++
- Title
- iostream library in cpp
- Category
- C++
- Title
- getch c++ library
- Category
- C++
- Title
- how to create a vector in c++
- Category
- C++
- Title
- c++ vector lower_bound index
- Category
- C++
- Title
- c++ argv
- Category
- C++
- Title
- case label in c++
- Category
- C++
- Title
- opencv compile c++
- Category
- C++
- Title
- calculate factorial
- Category
- C++
- Title
- c++ declare char
- Category
- C++
- Title
- conditional operator in cpp
- Category
- C++
- Title
- modulo c++
- Category
- C++
- Title
- how to find the index of an element in a vector c++
- Category
- C++
- Title
- bool function in c++
- Category
- C++
- Title
- c++ ros publisher
- Category
- C++
- Title
- programa para saber si un numero es primo
- Category
- C++
- Title
- mysqli connect
- Category
- C++
- Title
- C++ Student::Student()
- Category
- C++
- Title
- c++ for loop syntax
- Category
- C++
- Title
- coronavirus
- Category
- C++
- Title
- power c++
- Category
- C++
- Title
- c++ delete dynamically allocated array
- Category
- C++
- Title
- c++ replace n substrings
- Category
- C++
- Title
- initialize map c++
- Category
- C++
- Title
- how to declare a function in c++
- Category
- C++
- Title
- cloud hosting
- Category
- C++
- Title
- removing repeated characters in a string c++
- Category
- C++
- Title
- hohw toparse a string in c++
- Category
- C++
- Title
- substitution failure is not an error
- Category
- C++
- Title
- maximum subarray sum in c++
- Category
- C++
- Title
- what is time complexity of insertion sort
- Category
- C++
- Title
- std::reverse
- Category
- C++
- Title
- c++ clear console
- Category
- C++
- Title
- getting a random letter in c++
- Category
- C++
- Title
- create new file c++
- Category
- C++
- Title
- cout value c++
- Category
- C++
- Title
- c++ empty stream
- Category
- C++
- Title
- c++ parse int
- Category
- C++
- Title
- passing reference in c++
- Category
- C++
- Title
- traverse a map
- Category
- C++
- Title
- c++ string to integer without stoi
- Category
- C++
- Title
- ue4 c++ overlapping functions cpp setup
- Category
- C++
- Title
- best fit algorithm
- Category
- C++
- Title
- body parser
- Category
- C++
- Title
- memset c++
- Category
- C++
- Title
- append string to another string c++
- Category
- C++
- Title
- sieve of eratosthenes c++
- Category
- C++
- Title
- c++ code to print hello world
- Category
- C++
- Title
- bitset c++
- Category
- C++
- Title
- two sum problem in c++
- Category
- C++
- Title
- c++ functions
- Category
- C++
- Title
- how to avoid tle in c++
- Category
- C++
- Title
- range of long long in c++
- Category
- C++
- Title
- git branch in my bash prompt
- Category
- C++
- Title
- find in set of pairs using first value cpp
- Category
- C++
- Title
- c++ function to find minimum element in array
- Category
- C++
- Title
- how to sort an array according to another array c++
- Category
- C++
- Title
- c++ typeid get type name
- Category
- C++
- Title
- how read a shader from another file c++
- Category
- C++
- Title
- select elements from array C++
- Category
- C++
- Title
- new in c++
- Category
- C++
- Title
- how to use max_element in c++ with vector
- Category
- C++
- Title
- zeros of array c++
- Category
- C++
- Title
- namespace c++
- Category
- C++
- Title
- how to print 5 precision float in c++
- Category
- C++
- Title
- counting valleys hackerrank solution in c++
- Category
- C++
- Title
- primeros numeors primos menores que
- Category
- C++
- Title
- Merge k sorted linked lists and return it as one sorted list.
- Category
- C++
- Title
- check for bst
- Category
- C++
- Title
- how to cout in c++
- Category
- C++
- Title
- solve linear equations geeksforgeeks
- Category
- C++
- Title
- getline not working c++
- Category
- C++
- Title
- power in c++
- Category
- C++
- Title
- c++ string^ to char*
- Category
- C++
- Title
- reverse in vector c++
- Category
- C++
- Title
- euler phi gfg
- Category
- C++
- Title
- initialising 2d vector
- Category
- C++
- Title
- c++ write string
- Category
- C++
- Title
- generate random double c++
- Category
- C++
- Title
- switch case sinax c++
- Category
- C++
- Title
- remove element by index from vector c++
- Category
- C++
- Title
- make an x using asterisk c++
- Category
- C++
- Title
- preorder traversal c++
- Category
- C++
- Title
- cout console
- Category
- C++
- Title
- max heap c++ stl;
- Category
- C++
- Title
- how to print nth palindrome number in c++
- Category
- C++
- Title
- vector concat c++
- Category
- C++
- Title
- get data from terminal c++
- Category
- C++
- Title
- user input c++
- Category
- C++
- Title
- translate
- Category
- C++
- Title
- is TLE means my code is correct but taking more time to computr
- Category
- C++
- Title
- object reference not set to an instance of an object c#
- Category
- C++