No products in the cart.

Ask questions which are clear, concise and easy to understand.

Ask Question
  • 1 answers

Anupma Kumari 6 years, 9 months ago

Array is a collection of homogenous data items referenced under one name i.e it is a collection of same type of data items or variables under a name
  • 0 answers
  • 0 answers
  • 0 answers
  • 0 answers
  • 0 answers
  • 0 answers
  • 0 answers
  • 1 answers

Sia ? 3 years, 5 months ago

<th>Global Variable</th> <th>Local Variable</th>
Global variables are declared outside all the function blocks. Local Variables are declared within a function block.
The scope remains throughout the program. The scope is limited and remains within the function only in which they are declared.
Any change in global variable affects the whole program, wherever it is being used. Any change in the local variable does not affect other functions of the program.
A global variable exists in the program for the entire time the program is executed. A local variable is created when the function is executed, and once the execution is finished, the variable is destroyed.
It can be accessed throughout the program by all the functions present in the program. It can only be accessed by the function statements in which it is declared and not by the other functions.
If the global variable is not initialized, it takes zero by default. If the local variable is not initialized, it takes the garbage value by default.
Global variables are stored in the data segment of memory. Local variables are stored in a stack in memory.
We cannot declare many variables with the same name. We can declare various variables with the same name but in other functions.
  • 0 answers
  • 0 answers
  • 0 answers
  • 0 answers
  • 0 answers
  • 0 answers
  • 0 answers
  • 0 answers
  • 1 answers

Sia ? 3 years, 5 months ago

BASIS FOR COMPARISON WHILE DO-WHILE
General Form while ( condition) {
statements; //body of loop
}
do{
.
statements; // body of loop.
.
} while( Condition );
Controlling Condition In 'while' loop the controlling condition appears at the start of the loop. In 'do-while' loop the controlling condition appears at the end of the loop.
Iterations The iterations do not occur if, the condition at the first iteration, appears false. The iteration occurs at least once even if the condition is false at the first iteration.
Alternate name Entry-controlled loop Exit-controlled loop
Semi-colon Not used Used at the end of the loop

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App