Computer Science, asked by chandusimhadri4, 7 hours ago

7. Which is the correct keyword?
If we declare a variable with which of the following keyword so that its value will be automatically initialized to e.
Pick ONE option
auto
static
O
extern
register​

Answers

Answered by adssafety37
2

Answer:

static

Explanation:

Static is a reserved word in java. Hence, is a keyword

Answered by yogeshkumar49685
0

static is the correct keyword

Concept :

In the context of C++ variable declarations, the static and extern keywords specify storage class, which is a type specifier that determines the lifetime, linkage, and memory location of objects. At the global, namespace, and class scopes, the static keyword can be used to declare variables and functions. At the local scope, static variables can also be declared. The object or variable is allocated when the program starts and is deallocated when the program stops, which is known as static duration. External linkage means that the variable's name can be seen from outside the file where it is declared.

Find :

The keyword for which its value will be automatically initialized to e

Solution :

auto is a default storage class.

extern is a global variable

register is a variable which is stored inside a Register.

static is a local variable that is capable of returning a value even when control is transferred to the function call.

Hence, static is the correct keyword.

Similar questions