Answer to Question #182614 in C++ for zain ul abdeen

Question #182614
write a program Given two arrays A[n] & B[n] containing bit strings representing sets A & B respectively, write a code fragment to construct bit string representing the set
1
Expert's answer
2021-04-18T05:31:53-0400
using namespace std;


#define N	5
main(void)
{
	char A[N] = {'0','1','1','0','1'};
	char B[N] = {'1','0','1','1','0'};
	int a;
	
	cout<<"\nBit String A[n] = "; for(a=0;a<N;a++)	cout<<A[a]<<", ";
	cout<<"\nBit String B[n] = "; for(a=0;a<N;a++)	cout<<B[a]<<", ";
	cout<<"\n\nCombined Bit String A[n] + B[n] = "; 
	for(a=0;a<N;a++)	cout<<A[a]<<", ";
	for(a=0;a<N;a++)	cout<<B[a]<<", ";
	return(0);	
}




Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS