Computer Science, asked by ashagarg928, 5 months ago

23. Which of the following declaration is legal
(A) char str = 123
(B) char str = welcome
(C) int str = welcome
(D) int str = 12​

Answers

Answered by shreya22071812
2

Answer:

B) char str = welcome

Explanation:

B) char str = welcome

Answered by shubhashis2002
0

Answer:

The correct answer is ( c )char str =welcome.

Explanation:

Characters in a string are referred to as a one-dimensional array.

Arrays of characters are referred to as character arrays.

The fact that character arrays finish with the character "0" distinguishes them from all other types of arrays and strings.

Syntax:

char str_name = “string_name”;

If this syntax is used, "0" is automatically inserted.

Characters differ from strings in several ways.

Symbols are arranged into strings. The string's components are all characters.

Every character in the string takes up one byte, and it is kept in a continuous memory region.

The array's size does not have to be specified when it is initialised. However, '0' is not counted as its portion just in case you forget.

To learn more about character array here:

https://brainly.in/question/50357362

To learn  more about string here:

https://brainly.in/question/19574597

#SPJ3

Similar questions