Top "Char" questions

char typically refers to a character data-type, representing letters of text.

C char* to int conversion

How would I go about converting a two-digit number (type char*) to an int?

c char int
what's the default value of char?

char c = '\u0000'; When I print c, it shows 'a' in the command line window. So what's the …

java char
Why is conversion from string constant to 'char*' valid in C but invalid in C++

The C++11 Standard (ISO/IEC 14882:2011) says in § C.1.1: char* p = "abc"; // valid in C, invalid in C++ For the C++ …

c++ c string c++11 char
In C - check if a char exists in a char array

I'm trying to check if a character belongs to a list/array of invalid characters. Coming from a Python background, …

c arrays string char
Single quotes vs. double quotes in C or C++

When should I use single quotes and double quotes in C or C++ programming?

c++ c syntax char string-literals
"Char cannot be dereferenced" error

I'm trying to use the char method isLetter(), which is supposed to return boolean value corresponding to whether the character …

java char dereference
When to use malloc for char pointers

I'm specifically focused on when to use malloc on char pointers char *ptr; ptr = "something"; ...code... ...code... ptr = "something else"; …

c pointers malloc char
"Too many characters in character literal error"

I'm struggling with a piece of code and getting the error: Too many characters in character literal error Using C# …

c# char
How can I check if char* variable points to empty string?

How can I check if char* variable points to an empty string?

c pointers char
Java Replace Character At Specific Position Of String?

I am trying to replace a character at a specific position of a string. For example: String str = "hi"; replace …

java string replace char