Computer Science, asked by rajendraaryanr3548, 11 months ago

If we consider the string declaration as “char x[10];”, what is the length of the string that can be correctly represented by x?
a) 11
b) 9
c) 10
d) all of these

Answers

Answered by monika1676
2
11 is the answer of this question
Answered by gratefuljarette
1

Answer:

The length of the string will be 10.

Option (c)

Explanation:

We take the character data type i.e. char data type to print the strings. In the above code char x[10]: char is the data type and x is the variable and in the bracket, we are putting 10 which means it can hold data up to 10 characters or we say it can accept a string up to 10 characters length. We can find the length of the string by the strlen function in C or C++ programming.

Similar questions