You can do the same thing in C, but you should declare it of type char[], not char*, so that you can get its size with the sizeof operator:

char myArray[] = { 0x00, 0x11, 0x22 };
size_t myArraySize = sizeof(myArray);  // myArraySize = 3
Answer from Adam Rosenfield on Stack Overflow
Discussions

hardcode byte array in C - Stack Overflow
You can do the same thing in C, but you should declare it of type char[], not char*, so that you can get its size with the sizeof operator: More on stackoverflow.com
๐ŸŒ stackoverflow.com
How do i declare a byte variable? - Post.Byes
Try this: char* variable1; unsigned char* variable2; Or perhaps you need to tell us more about what you intend to do with the variable. Best regards, Tom ... Re: How do i declare a byte variable? On 10 Aug 2006 13:57:01 -0700 in comp.lang.c++, "Manuel" More on post.bytes.com
๐ŸŒ post.bytes.com
August 10, 2006
c - "byte" declaration and meaning of %s*%s%s - Stack Overflow
I have snippet from the C code (for LCD display). The code has no error. I just didn't understand some of snippet codes. In the code below, lcd_size is declared as byte, but why it can use with n... More on stackoverflow.com
๐ŸŒ stackoverflow.com
How to define byte array [ ] within a byte array [ ]
hello I want to know about the merging or listing of multiple array within a mast array and how to call them when needed a small example which is not actually the right one but a sample to explain what I need !!! int โ€ฆ More on forum.arduino.cc
๐ŸŒ forum.arduino.cc
18
1
July 18, 2023
๐ŸŒ
Quora
quora.com โ€บ Is-byte-a-data-type-in-C
Is byte a data type in C? - Quora
Answer (1 of 9): No. Or, more precisely, usually, yes. C has the data types char and unsigned char. The C standard says that they must be the size of a character on the platform the program is to run on. Therefore you cannot safely use a char data type as if it was a byte. However, so long as ...
๐ŸŒ
Bytes
bytes.com โ€บ home โ€บ forum โ€บ topic
How do i declare a byte variable? - Post.Byes
August 10, 2006 - An easy test for this is the following: #include <stdio.h> int main(void) { struct FourBytes { char a,b,c,d; }; switch(sizeof(s truct FourBytes)) { case sizeof(char[4]): puts("Packed nice and tight!"); break; case sizeof(int[4]): puts("Aligned for efficient access."); break; default: puts("Something funky's going on..."); } return 0; } Notwithstanding any of this, your char is going to be promoted to int every time you lay a finger on it. -- Frederick Gotham ... Re: How do i declare a byte variable?
๐ŸŒ
Processing
processing.org โ€บ reference โ€บ byte
byte / Reference / Processing.org
// Declare variable 'a' of type byte byte a; // Assign 23 to 'a' a = 23; // Declare variable 'b' and assign it the value -128 byte b = -128; // Declare variable 'c' and assign it the sum of 'a' and 'b'. // By default, when two bytes are added, ...
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ cprogramming โ€บ c_data_types.htm
C - Data Types
C is a statically typed language. The name of the variable along with the type of data it intends to store must be explicitly declared before actually using it.
๐ŸŒ
Cprogramming
cboard.cprogramming.com โ€บ c-programming โ€บ 134979-bit-sized-variable.html
Bit Sized Variable
February 22, 2011 - ***Background Information A byte is 8 bits. Bool is 1 byte. Char is 1 byte. Int is 4 bytes (therefore: 32 bits) ***What I want.. I've been programming
Find elsewhere
๐ŸŒ
Medium
materokatti.medium.com โ€บ why-does-c-use-char-rather-than-byte-21c25e4e2dce
Why does C use `char` rather than `BYTE`? | by TheDevStory | Medium
October 29, 2022 - // in Visual BasicDim byteValue1 As Byte = 201 Console.WriteLine(byteValue1) Dim byteValue2 As Byte = &H00C9 Console.WriteLine(byteValue2) Dim byteValue3 As Byte = &B1100_1001 Console.WriteLine(byteValue3)
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 58518052 โ€บ byte-declaration-and-meaning-of-sss
c - "byte" declaration and meaning of %s*%s%s - Stack Overflow
May I know what does "byte" do, when as declaration? what does print_str = "%s*%s%s and print_str = "%s %s%s" mean? #define LONGEST 60; byte register(char *temp_str,byte lcd_size,byte userlevel, byte unitsplit) { char temp_str2[LONGEST]; char *print_str; //declares a pointer to a character called "print_str"// if (unitsplit) print_str = "%s*%s%s"; //what does this line mean?
๐ŸŒ
Arduino Forum
forum.arduino.cc โ€บ projects โ€บ general guidance
How to define byte array [ ] within a byte array [ ] - General Guidance - Arduino Forum
July 18, 2023 - hello I want to know about the merging or listing of multiple array within a mast array and how to call them when needed a small example which is not actually the right one but a sample to explain what I need !!! int dam [] = {1,2,3,4,5}; int bridge [] = {1,2,3,4,5}; int pool [] = {1,2,3,4,5}; int waterfall [] = {1,2,3,4,5}; byte tanker1 { }; In above script want to merge all the four arrays in byte tanker 1
๐ŸŒ
Quora
quora.com โ€บ What-is-a-byte-array-in-C
What is a byte array in C? - Quora
Answer (1 of 4): Never heard this term but if it is: * Array of elements of 1 byte each then make an array of [code ]char[/code] since the size of [code ]char[/code] is 1 byte each (on most of the systems). * If it is an array having it's complete size as 1 byte and you want to manipulate ever...
๐ŸŒ
Carnegie Mellon University
cs.cmu.edu โ€บ ~ab โ€บ 15-123S09 โ€บ lectures โ€บ Lecture 03 - Bits Bytes and Data Types.pdf pdf
Copyright @ 2008 Ananda Gunawardena Lecture 03 Bits, Bytes and Data Types
3.1. Write a C program that can show the number of bytes used by each of standard data ยท types, such as int, double, etc (hint: use sizeof ). Use this information to understand the ยท size of the maximum and minimum signed integers. (hint: INT_MIN, INT_MAX). Look ยท for same in other data types. Include <limits.h> and <float.h>. See Bb header files links. 3.2. Write a C program to find the storage locations (or addresses) of 3 variables (int, double, string or char*) you declare.