answersLogoWhite

0

void foo (char& c)

{

cin >> c;

}

int main()

{

char ch[10] {};

for (size_t c=0; c!=10; ++c)

foo (c[0]);

}

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

Which function used to read characters into an array specified by its parameter?

Examples: recv, read, fread, gets, fgets, scanf, fscanf


How do you clear a character array?

with function memset


What is an example of array?

argv, which is the second parameter of function mainint main (int argc, char *argv[])


How can np.permute be used to rearrange elements in a numpy array?

The np.permute function in numpy can be used to rearrange elements in a numpy array by specifying the desired order of the dimensions. This function allows for reshaping and reordering of the elements within the array based on the specified permutation of dimensions.


What does it mean to have a string split in java?

To have a string split in Java means that a string array, containing substrings (can be delimited by elements of a specified string or Unicode character array), is returned.


What degrees is Array Azimuth specified as?

degrees


How do you convert a string into a character array?

A string is, by definition, a character array. No conversion is required.


What is str split function in PHP?

According to PHP official manual It is used to converts a string to an array.If the optional split_length parameter is specified, the returned array will be broken down into chunks with each being split_length in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1.If the split_length length exceeds the length of string, the entire string is returned as the first (and only) array element. Syntax: array str_split ( string string [, int split_length] );Example :< ?php$strW3 = "Hello w3answers";$arrW3 = str_split($strW3 );$arrW3 = str_split($strW3 , 3);print_r($arrW3);print_r($arrW3);?>


What is character array?

In other way Character array is called strings.A group of characters can stored in a character array. e.g. char name[] ={'S','A','T','Y','A','\0'};


How is an array specified?

int a[100]; char b[50];


What is the array function in CAD?

there r 2 types of array in cad - rectangular array and polar array...........


Why the array is starting from zero?

By design; it makes the compiler's work easier. 1-based array's addressing-function: Address (array, index) = Address (array) + (index-1)*Elemsize(array) 0-based array's addressing-function: Address (array, index) = Address (array) + index*Elemsize (array)