Where should variable should declare | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Where should variable should declare

7th Jul 2018, 7:09 AM
Sameer Kulkarni
Sameer Kulkarni - avatar
2 Respostas
+ 10
you can declare variables in functions,scopes e.t.c https://www.sololearn.com/learn/CPlusPlus/1606/
7th Jul 2018, 7:23 AM
į Œį ŒBrains[Abidemi]
į Œį ŒBrains[Abidemi] - avatar
+ 1
In cpp, you can declare a variable anywhere you want, remember declare it prior to using anywhere in the code. also do keep in mind, a variable declared in a local scope has no existence outside the scope.
7th Jul 2018, 7:59 AM
Nikhil Dhama
Nikhil Dhama - avatar