EE502 Assignment Answers
EE502 Assignment Answers
Address Content
789652 200
789653 734
789654 92
789655 3
789656 2
789657 17
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
//code
char a = 200;
char b =734;
char c =92;
char d = 3;
char e =2;
char f =17;
return 0;
}
b. What is the scope of the variables used in the program above? (0.5 Marks)
The scope of the variable used is a local variable
#include <stdio.h>
#include <stdlib.h>
Int main()
{
signed char a;
printf("Please enter a number:");
scanf("%d", &a);
if(a& 0b00001000 ==0) //hint: use bit masking
{
printf(“LOW”);
}
else
{
printf(“HIGH”);
}
return 0;
}
(2.5 Marks)
while(EE502_Test_1==True)