The scope of a variable declared within a for() loop is:

a) Only known within the for() loop

b) Global across all functions in the file containing the code

c) Local to the function containing the for() loop

d) It depends on the variable type

Respuesta :

Answer:

a

Explanation:

The variable declared in the for is accessible only within the for loop  and it goes out of scope once the loop get end

eg : for(int i=1;i<=10,i++) // variable i is declared

{

// variable i is visible only in this block,

}

//After this the variable i goes out of scope