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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is it usually a bad idea to use gets()? Suggest a workaround.

896


Explain how can I open a file so that other programs can update it at the same time?

586


Write a program to swap two numbers without using third variable in c?

613


what is the basis for selection of arrays or pointers as data structure in a program

3784


What are lookup tables in c?

548






When c language was developed?

633


What is a stream in c programming?

588


What are structure types in C?

662


Why is void main used?

613


What is a union?

607


When we use void main and int main?

588


What do you mean by a local block?

626


What is a file descriptor in c?

557


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

4900


What is the use of clrscr?

590