Question: For the statements listed below: if ( x < = 5 ) x + = 2 ; else x = 2 ; 1 , 2

For the statements listed below:
if (x <=5)
x+=2;
else x =2;
1,2,3,4,5,6,7,8,9,10
4. After execution of the above statements, what will be the value of x, if it initially had the value of 7.
5. After execution of the above statements, what will be the value of x, if it initially had the value of 3.
6. After execution of the above statements, what will be the value of x, if it initially had the value of 5.
7. The if statement below will evaluate TRUE when P2IN is equal to which of the values listed.
if ((0x04 & P2IN)==0x00);
a)0x04=00000100b b)0x0F =00001111b c)0xFB =11111011b d)0xF4=11110100b
8. Fill-in-the-blanks of the program below.
/* C program in which Totals equals the sum of the 5 elements of Array1*/
void main (void)
{
int Array1[]={1,2,3,4,5};
volatile int Totals =0;
volatile int i =0;
for (i=0; i<__; i++)
Totals +=_______________;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!