control 50 devices which has 2 states on and off.using
bitwise operator.plz answer it its urgent



control 50 devices which has 2 states on and off.using bitwise operator.plz answer it its urgent..

Answer / vishnu

int main()
{
int dev[50];
int i;
int k=1;
for(i=0;i<50;i++)
{
k =1^k;
dev[i]= k;
printf("%d",k);
}


return 0;
}

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

What are the Advantages of using macro

0 Answers  


How do you determine a file’s attributes?

0 Answers  


How is a pointer variable declared?

0 Answers  


Write a program to implement queue.

0 Answers   Aricent,


Write a program to identify if a given binary tree is balanced or not.

0 Answers   JPMorgan Chase,






When can a far pointer be used?

0 Answers  


What are nested functions in c?

0 Answers  


What is pointers in c?

0 Answers  


write a program for egyptian fractions in c?

1 Answers   Satyam,


Why ordinary variable store only one value  

0 Answers  


Can two or more operators such as and be combined in a single line of program code?

0 Answers  


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

0 Answers  


Categories