Hi,
My question: "Write a C program to find out the repeating "bit pattern" in the stream of bits given as the input. The continuous stream of bits is given in the attached text file, 'BitStream.txt'. Bits are given in a continuous fashion in a single line. It can be assumed that the stream is made by repeating a particular pattern n times."
The following is expected as the output
- Length of bit pattern
- Exact bit pattern
- How many times the bit pattern is repeated in the given BitStream.
Ex: Consider a bit stream below
0011001100110011001100110011
The outputs expected are
- Length: 4
- BitPattern: 0011
- Number of times its repeated: 7
BitStream.txt File Contains(manually i found that stream in Bold letters is continously repeating):
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
00110011001100011110111001111011110100011010111110 1001100001011000001011111111111001111001010
If anybody can help?