Quote Originally Posted by oogabooga View Post
Presumably you want
Code:
fp = fopen(argv[2], "r");
In what sense do you want to "scan the file for a given character", i.e., what do you want to do:
1. count how many times it occurs?
2. find if it occurs at all in the array?
3. find the location of the first occurrence in the array?
Thank you.
I want to scan for if it character appears at all within the file. If it does the address and 16 bits should be displayed.


For example, if the character 67 (‘C’) is searched for and is located at
address 7654321, the output should show (16 bytes):
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
[7654320] [ ~ C L E M S O N T I G E R S ! ]
7E 43 4C 46 4D 53 4F 4E 20 54 49 47 45 52 53 21