- 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
Convert character array to string in Arduino
In order to convert a character array to a string, the String() constructor can be used. An example is shown below −
Example
void setup() { // put your setup code here, to run once: Serial.begin(9600); Serial.println(); char buf[10] = "Hello!"; Serial.print("Char array: "); Serial.println(buf); String s = String(buf); Serial.print("String: "); Serial.println(s); } void loop() { // put your main code here, to run repeatedly: }
The output of the Serial monitor is shown below −
Output
- Related Articles
- Convert string to character array in Arduino
- Java program to convert a character array to string
- Convert string to integer/ float in Arduino
- Convert string to lowercase or uppercase in Arduino
- How do you convert a string to a character array in JavaScript?
- Convert Character Array to IntStream in Java
- Java Program to Convert Character to String
- Golang Program to Convert Character to String
- In how many ways we can convert a String to a character array using Java?
- How to convert a single character to string in C++?
- Convert integer array to string array in JavaScript?
- Convert string to char array in Java
- Convert Char array to String in Java
- Convert string to char array in C++
- how to convert Object array to String array in java

Advertisements