Answer:
item based for loop is used to iterate items in a collection .it is useful to apply some operations on item. Index based for loop is used to execute some logic repetitively. While loop also useful to execute a logic repetitively
Explanation:
item based for loop is used to iterate items in a collection .it is useful to apply some operations on item. Index based for loop is used to execute some logic repetitively. While loop also useful to execute a logic repetitively
in c#.net , following example explains this
using system;
void main(){
String[] names=new names[20];
int counter=0;
//index based for loop
for(int i=0;i<20;i++){
console.read(names[i]);
}
//item based for loop
foreach(string s in names){
console.writeline(s);
}
//while loop
while(counter<20)
{
console.read(names[counter];
counter++;
}
}
you can only have one picture on here ¿¿¿¿¿¿¿¿¿¿¿¿¿
Answer:
Elections
Explanation:
This is because the applications helps citizens to carry out legal elections without stress of moving long distances and it helps keeps votes secret coz of personal view of the data entry
The answer to this question is B. Some people feel that the stock market is too risky for them.
Answer:
a) AL will contains 0011 1100
Explanation:
In assembly language, shifting bits in registers is a common and important practice. One of the shifting operations is the SHR AL, x where the x specifies that the bits be shifted to the right by x places.
SHR AL, 2 therefore means that the bits contained in the AL should be shifted to the right by two (2) places.
For example, if the AL contains binary 1000 1111, the SHR AL, 2 operation will cause the following to happen
Original bit => | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
Shift once to the right => | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | (0) |
Shift once to the right => | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | (0) | (0) |
Notice;
(i) that there are two shifts - one at a time.
(ii) that the bits in bold face are the bits in the AL after the shift. Those that in regular face are those in the carry flag.
(iii) that the new bits added to the AL after a shift are the ones in bracket. They are always set to 0.