Top "Char" questions

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

Deprecated conversion from string literal to 'char*'

I have a program which declares an array of strings like this: char *colors[4] = {"red", "orange", "yellow", "blue"}; But I …

c++ string char deprecated literals
C++ char array null terminator location

I am a student learning C++, and I am trying to understand how null-terminated character arrays work. Suppose I define …

c++ arrays char null-terminated
Most efficient way to convert a single char to a CharSequence

What's the most efficient way to pass a single char to a method expecting a CharSequence? This is what I've …

java android string char charsequence
Convert from uint8_t * to char * in C

I am programming in C using Atmel Studio (for those unfamiliar with this it is used to program to micro …

c casting char type-conversion uint8t
Getting upper and lower byte of an integer in C# and putting it as a char array to send to a com port, how?

In C I would do this int number = 3510; char upper = number >> 8; char lower = number && 8; SendByte(upper); …

c# char bytearray bit-shift bitmask
Reading text file into a char array in Java

I am reading a text file and trying to store it into an array char by char. My approach (below) …

java arrays file-io char bufferedreader
Converting char* to unsigned char*

How do I copy a char* to a unsigned char* correctly in C. Following is my code int main(int …

c char sha1 unsigned strcpy
Using strcpy with a string array in C

I have a character array defined as follows: char *c[20]; I'm trying to do: strcpy(c[k], "undefined); but it's …

c arrays char strcpy
C++ cin char read symbol-by-symbol

I need to read symbol-by-symbol. But I don't know how to read until end of input. As exemple test system …

c++ stream char cin
Java: println with char array gives gibberish

Here's the problem. This code: String a = "0000"; System.out.println(a); char[] b = a.toCharArray(); System.out.println(b); returns 0000 0000 …

java arrays char output