Search
 
SCRIPT & CODE EXAMPLE
 

CPP

arduino get size of array

int ary[12];
int len = sizeof(ary)/sizeof(ary[0])
Comment

length of an array arduino

This program prints out a text string one character at a time. Try changing the text phrase.

char myStr[] = "this is a test";

void setup() {
  Serial.begin(9600);
}

void loop() {
  for (byte i = 0; i < sizeof(myStr) - 1; i++) {
    Serial.print(i, DEC);
    Serial.print(" = ");
    Serial.write(myStr[i]);
    Serial.println();
  }
  delay(5000);  // slow down the program
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: find all occurrences of a substring in a string c++ 
Cpp :: how to run code in devcpp 
Cpp :: C++ Kelvin to Celsius 
Cpp :: how to fix class friendship errors in c++ 
Cpp :: search update delete files in c++ 
Cpp :: capture an entire line C++ 
Cpp :: dev c++ tahe last word error 
Cpp :: check file exist cpp 
Cpp :: cannot open include file unreal 
Cpp :: pairs 
Cpp :: integer to string c++ 
Cpp :: How to block window resize sfml c++ 
Cpp :: how to define an unsigned signal in VHDL 
Cpp :: c++ run loop for 5 seconds 
Cpp :: c++ read file to char buffer 
Cpp :: if not defined c++ 
Cpp :: c++ file to string 
Cpp :: c++ get last character of string 
Cpp :: std string to const char * c++ 
Cpp :: retu7rn this c++ 
Cpp :: how to loop a 2 dimensional vector in c++ starting from second element 
Cpp :: iterating string in cpp 
Cpp :: convert int to string c++ 
Cpp :: double to string c++ 
Cpp :: factorial using recursion cpp 
Cpp :: syntax c++ 
Cpp :: how to do nCr in c++ 
Cpp :: latex table landscape 
Cpp :: getline cpp 
Cpp :: how to pass function as a parameter in c++ 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =