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);
}
Comments
Leave a comment