Questions
Programming Language Concept assignment: 1. Design abstract data type for matrices with integer elements in C++...

Programming Language Concept assignment:

1. Design abstract data type for matrices with integer elements in C++ language, including operations for matrix addition, subtraction, and multiplication!
2. Design abstract queue data types for float elements in C++ language, including operations for enqueue, dequeue, and empty. The dequeue operation removes the element and returns its value!
3. Set semaphores in Ada and use them to provide co-operation and synchronization of competitions in shared buffer instances!

In: Computer Science

For the following core processors state the main characteristics and latest features that added to the...

For the following core processors state the main characteristics and latest features that added to the processor.

1- Core Duo

2- Core Solo

3-Core 2 Solo       

4-Core 2 Duo            

5- Core 2 Quad

6- Core 2 Extreme

7- Core i3     

8- Core i5      

9- Core i7     

10- Core i9

In: Computer Science

Create and Compile a Python Script without using Numpy that Generate an nxn matrix using Python...

Create and Compile a Python Script without using Numpy that

  • Generate an nxn matrix using Python Script (ie n=user input)
  • Ask (user input ) and (randomly generated) row and column location
    • Assign Q to (known row and column location ) and 0 to all others location
  • Please show compile script working as well

In: Computer Science

Your assignment is to complete a network diagram for a small company. You will place a...

Your assignment is to complete a network diagram for a small company. You will place a number of network elements on the diagram and label them appropriately. A network diagram is important to communicate the design features of a network between network administrators, system administrators, and cyber-security analysts. It helps to create a shared mental model between these different technologists, yet each will have their own perspective on what is important to have documented on the diagram. Please review a description of ABC Corporation’s network resources and how they are allocated.

ABC Corporation’s Network Description

ABC Corporation is a small business in the heart of Central Pennsylvania. They provide services to their clients all over the region. The three-story main office building is where all of the employees report to work each day. There are no remote users. ABC Corporation is a very traditional business. While they have a computer network and are connected to the Internet, they aren’t very fancy and don’t yet have a need for telecommuting, wireless networks, or smart phones. All of their computers are desktop machines and are connected with wired Ethernet connections. All of the network wiring is CAT-6 twisted pair wiring that goes from the office location to a wiring closet. There is one wiring closet on each floor. Each closet is connected to the basement wiring closet via fiber.

There are several departments of the company. The administrative office has ten employees including the CEO, executive Vice-President, a human resources manager, and several assistants and secretaries. The finance office has fifteen employees. Both of these divisions are on the third floor.

The second floor has the Sales and R&D departments. There are a total of twenty employees in the Sales Department and includes sales executives and assistants. All of the sales department personnel have laptop computers, but they are still connected via the wired network. The R&D department has ten engineers who have two computers each – one in their office and one in their lab spaces.

The first floor has the shipping/receiving department, manufacturing department, and the receptionist. The receptionist shares a computer with the night watchman, since they work opposite shifts. There are twenty people in manufacturing, but they only use three computers to enter their production details into the company’s ERP system. The shipping/receiving department has six people, each with a computer that connects to UPS, Fedex, and USPS systems, prints packaging labels and shipping documents. There is also a conference room/training room on the first floor with a multimedia system that includes a podium computer, projector, and all of the bells and whistles.

The basement houses the maintenance department, information technology, and the mail room. The mail room clerk doesn’t use the computers at all. The two maintenance workers have computers at their desks that they use to enter reports of work performed. The IT Department has seven employees, each with a desktop computer. They also manage the server farm, which includes two domain controllers, one print server, one mail server, one database server, one internal web server, one external web server (on the DMZ interface of the firewall), a file server, a special server for the ERP system, and a backup server.

Layer 2/3 Network Devices

Each floor needs to have an Ethernet switch in its network closet. Determine the number of ports that are needed on each floor. Don’t forget the basement. The server farm and DMZ each will need to have its own switch, separated from the users’ network.

Each switch connects to a centralized router on a different interface, giving one subnetwork for each floor of the network, plus one for the server farm, one for the DMZ, and one for the Internet. Determine how many ports the router needs.

IP Address Assignments

The router will perform Network Address Translation between the local network and the Internet. Therefore, for each sub-network, assign a CIDR /24 sized network from the IANA private range of 172.28.0.0/16. One network should get 172.28.1.0/24, the next should get 172.28.2.0/24, the next should get 172.28.3.0/24 etc. While you could optimize the use of the IP range by using smaller subnets, this is not required in this assignment.

Create a Network Diagram

Your network diagram needs to include the following elements:

  • An Internet Service Provider Network (represented as a cloud)
  • Router with enough ports to meet the needs of the organization
  • A switch for each floor – you will need to identify how many ports each switch on each floor needs to have
  • You DO NOT need to show every single computer on your diagram. However, you need to show groups of computers, plus their use. So, if there are 5 people in the same department, you can show all 5 computers with one icon/glyph and label it appropriately.
  • Each grouping of computers needs to have the IP Address range documented on the diagram. Assign the x.x.x.1 address of each network to the appropriate port on the router.

Network Documentation

Your network design document needs to explain each element of the network. Each Layer two (switch) and Layer three (Router) device needs to be described in terms of number of ports. The number of computers for each department and floor also needs to be documented. The IP address ranges need to be explained – including the IP Address range that you assigned, the number of IP Addresses that the subnetwork will use, and the number of IP addresses that remain unused in that subnet.

What to Turn In

For assignments that require you to submit Visio work, please export your file and submit as a PDF. Also, please submit your original Visio file.
You also need to turn in a .doc/.docx file that explains your network diagram elements. Include snapshots from your network diagram in your .doc/.docx file – and annotate your diagram snapshots to better help your explanation of your network.

In: Computer Science

Translate the following C++ code to Pseudocode: int main() { stack<char> stk,stk2; int length =0,ele; while(cin>>ele)...

Translate the following C++ code to Pseudocode:

int main()
{
stack<char> stk,stk2;
int length =0,ele;
while(cin>>ele)
{
stk.push(ele);
length++;
}
if(length%2)
stk.pop();
for (int i=0;i<length/2;i++)
{
ele=stk.top();
stk.pop();
stk2.push(ele);
}
int flag=1;
for(int i=0;i<length/2;i++)
{
if(stk.top()==stk2.top())
{
stk.pop();stk2.pop();
}
else
{
flag=1; break;
}
}
if(flag==1) cout<<"NOT palindrome";
else
cout<<"palindrome";
}

In: Computer Science

Use CPP 1) Parking charge application: A parking garage charges a $20.00 minimum fee to park...

Use CPP

1) Parking charge application: A parking garage charges a $20.00 minimum fee to park for up to 3 hours. The garage charges an additional $5.00 per hour for hour or part thereof in excess of 3 hours. The maximum charge for any given 24-hour period is $50.00. Assume that no car parks for longer than 24 hours at a time. Write a program that calculates and prints the parking charge for each of 3 customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should save the result in a array of Customer. The class customer is the following:

class customer{ string plate; float hour; float fee; }

Your program should use the function calculateCharges to determine the fee for each customer. You should print the result for the 3 customers in the following format:

Plate Hours Charge

132AAC 1.5 20.00

236URT 4.0 25.00

390ROP 24.0 50.00

TOTAL 29.5 95.00

In doing this question make sure to keep the array of customer as global variable.

Please send me the screenshot of output too.

Thanks

In: Computer Science

Write push and pop functions on C/C++. Have a program having 10 random integers(hardcoded)and put them...

Write push and pop functions on C/C++.

Have a program having 10 random integers(hardcoded)and put them on your stack.

Also, print them. Read a character from the keyboard.

If the character is an “o” then pop from the stack but don’t print.

If the character is a “p”, then pop from the stack and print that number.

If the character is an “e” or the stack is empty, end the program.

In: Computer Science

1. Solve a function (e​ .g.​, y(x) = sin(x) / (sin(x/10) + x/10) for many different...

1. Solve a function (e​ .g.​, y(x) = sin(x) / (sin(x/10) + x/10) for many different values of x between a user-defined min and max, and store the values in a list. Also, print the maximum value of y(x) for the given range.

2. Find the list in a list-of-lists whose sum of elements is the highest, and print the sum and list to the user.

e.g., [[1, 2], [2, 5], [3, 2]] → [2,5] with a sum of 7.

In: Computer Science

making a python code for this: A palindrome is a sequence that reads the same backwards...

making a python code for this:

A palindrome is a sequence that reads the same backwards as forwards. Numbers can also be palindromes if we consider their digits as a sequence, for example 12121 and 8228 are palindromes.

We can find palindromes from an initial seed number using the reverse and add method: choose a number, reverse its digits and add it to the original. If the sum is not a palindrome (which means, it is not the same number from left to right and right to left), repeat this procedure.

For example:

195 Initial number

+591

—–—

786

+687

—–—

1473

+3741

—–—–

5214

+4125

—–—–

9339 Resulting palindrome

In this particular case the palindrome ‘9339’ appeared after the 4th addition. This method leads to palindromes in a few iterations for almost all integers. But there are interesting exceptions. 196 is the first number for which no palindrome has been found. It is not proven though, that there is no such a palindrome.

You must write a program that give the resulting palindrome and the number of iterations (additions) to compute the palindrome.

You might assume that all tests data on this problem:

  • will have an answer ,
  • will be computable with less than 1000 iterations (additions),
  • will yield a palindrome that is not greater than 4,294,967,295.

Input

The first line will have a number N (0 < N <= 100), where N is the number of test cases. The next N lines will each have one number, P, which is the initial number from which to compute a palindrome.

The file could contain non-integer data, which shall be processed as indicated below.

Output

For each of the N tests you will output one line as follows:

  • when the line contains an integer, output: number_of_iterations and resulting_palindrome separated by one space
  • when the line contains invalid data (anything other than a single integer) output: the phrase ‘Bad data:’ followed by the input

Sample Input

4

195

265

2.7

750

Sample Output

4 9339

5 45254

Bad data: 2.7

3 6666

In: Computer Science

Write a C++ program that does the following: Read and input file containing the following PersonAName,...

Write a C++ program that does the following:

Read and input file containing the following

PersonAName, PersonBName, XA,YA, XB, YB

where the coordinates of PersonA in a 100 by 100 room is XA, YA

and the coordinates of PersonB is XB, YB.

Use square root function in cmath sqrt() to calculate the shortest distance between two points.

A file will be uploaded in this assignment that will list coordinates of two people.

The program should use a function call that returns the distance. If the distance is less than 6 feet, the report the case giving the names and the calculated distance.

Blackboard will be updated with a data file by Saturday morning.

Data fields

Person A Name Column 1-10

Person B Name Column 11-20

Person A X coordinate 21-23

Person A Y coordinate 25-27

Person B X coordinate 31-33

Person B Y coordinate 35-37

Attached file coordinates.txt

1---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
Apple     John      5   2     3   4
Apple     Ben       5   2     10  4
Apple     Carla     5   2     4   3
Apple     Sonny     5   2     70  55
Tom       Jerry     24  34    29  39
Tom       Tim       24  34    50  55
Tom       Tracy     24  34    88  31
Tom       Tammy     24  34    87  90
Jim       Tammy     74  89    87  90
James     Tammy     72  88    87  90
Josh      Tammy     59  24    87  90
Barry     Tom       12  78    13  65
Barry     Carla     12  78    4   3
Barry     John      12  78    3   4
Barry     Sonny     12  78    70  55
Barry     Jerry     12  78    29  39
Barry     Juan      12  78    14  80
Ann       Margaret  25  44    28  79
Ann       Silvia    25  44    25  55

In: Computer Science

C# The Zookeepers need a system to keep track of all their animals. They need to...

C#

The Zookeepers need a system to keep track of all their animals. They need to be able to enter all their animals into the system in a way that allows them to identify and locate them. This requires identifying them by species, age and one characteristic unique to their species.

  • There are three cages and the user must input information about the animal in each one. After accepting input for all three cages, the program should output the contents of each cage in a way that exposes all the information about that animal.
  • The program should accept the following species: Lion, Bear, Wolf.
  • Define classes for the Lion, Bear, and Wolf species that all implement the Animal interface. All Animals should have an int field for age and a String field for species. Each species of animal should have its own unique field defined: String maneColour for Lions, int speed for Wolves, and bool isGrizzly for Bears. They should also define two methods:
    • RequestUniqueCharacteristic() which outputs a string asking for a value to store in the specific animal’s unique characteristic and stores it in the appropriate field (maneColour, speed, or isGrizzly)
    • GetDescription() which outputs a short sentence that includes all the animal’s info.
  • Store all the Animals in a list of animals (List<Animal>) and iterate through the list to output all the animals after input is received.

Sample Session

Cage 1
What is the animal’s species? Lion
How old is it? 6
What colour is its mane? Brown

Cage 2
What is the animal’s species? Wolf
How old is it? 9
How fast can it run (in km/h)? 20

Cage 3
What is the animal’s species? Bear
How old is it? 12
Is it a grizzly bear (true/false)? No
=====
Cage 1 contains a 6-year-old lion with a brown mane.
Cage 2 contains a 9-year-old wolf that runs 20 km/h.
Cage 3 contains a 12-year-old non-grizzly bear.

In: Computer Science

An Emerging Threat: Ransomware The attack, expertly planned, was insidious. For six weeks or more, cybercriminals...

An Emerging Threat: Ransomware

The attack, expertly planned, was insidious. For six weeks or more, cybercriminals purportedly from either North Korea or Russia wormed their way into Monroe College’s computer systems, maneuvering undetected as they sought out weak points. Then, in July 2019, they pounced. Using an IT staffer’s pilfered password across platforms, hackers infected every server on Monroe’s two New York City-area campuses with a virus, effectively locking down administrative files, email, learning management systems, and website. “The college was a big house we were all locked out of,” says Marc Jerome, president of Monroe, a for-profit institution with 8,000 students. What’s more, as the campus reeled, hackers held Monroe’s tech infrastructure for ransom. They would restore it, they told the college’s leaders, in exchange for the Bitcoin equivalent of $1.6 million.
As Monroe students became instantly reacquainted with turning in assignments on paper, campus officials sprang into action, working feverishly to restore damaged systems. But without a policy for dealing with such attacks, Monroe was faced with few choices. After a couple weeks of failed attempts to use backup systems (which had also been infected) and with little hope of restoring its online presence, college officials decided to contact the college’s insurance company, as well as hire a law firm and a tech expert to negotiate with the attackers. In the end, Monroe paid them a considerably lesser sum than had been demanded in order to obtain the
T
• •

•   

• •


WITH SUPPORT FROM
decryption keys needed to eliminate the virus and bring the campus’s tech services back online. Monroe had been victimized by a ransomware attack — and it isn’t the only college that has had to face off with international criminal enterprises that have perpetrated such disruptions in recent years. Most attacks start with “phishing” expeditions. Cybercriminals send virus encoded emails in the hope that someone at a college — a professor, a staff member, a student — will open one and set in motion the virus or malware contained therein. The virus then replicates itself throughout a network. Some institutions have fended off ransomware incursions with security software or with the help of enhanced computer-safety training, while others have seen their systems disabled and their daily operations threatened. Some have devised policies for dealing with attacks, while others are in the process of considering them. Several institutions report that they have created policies but are not making them public. Doing so, they argue, might encourage such attacks or give cybercriminals an angle from which to start one. Such secrecy is far from rare. Many ransomware attacks are not reported. Colleges may not want the public to know that they have been successfully targeted. IT experts say such reticence leads some college officials to underestimate the threat. Because criminal enterprises, usually originating in China, Eastern Europe, North Korea, Russia, and Vietnam, typically demand payment in cryptocurrency to protect their anonymity, it has proved difficult to track them down or slow the rate of attacks. Law-enforcement agencies generally offer few answers. The onus on preventing ransomware attacks and policing tech systems falls on the institutions themselves. This, too, can prove difficult, given that colleges provide faculty members and students with wide access to their networks and content. The very openness that many institutions point to with pride can often become a security headache. While there is some question as to whether the threat of ransomware at colleges and universities is growing or flattening out, there is evidence that more higher-ed institutions are stepping up protection. More colleges now carry
insurance policies designed to pay them for the lost revenue and repairs that can result from cyberattacks. Several institutions have stepped up training of computer users and shored up security to forestall invasive tactics. And some have invited outside experts to look for potential vulnerabilities in their systems. Facing their seemingly built-in disadvantages, many colleges are devising policies that will make their campuses and systems safer, experts say, whether by preventing attacks, dissuading criminal enterprises from attempting them, or protecting themselves against loss. This Trends Snapshot outlines the latest efforts.   
The very openness that many institutions point to with pride can often become a security headache.
“No-Pay” Policies The FBI, among other law-enforcement agencies, urges colleges to refuse to pay ransoms. Many institutions, especially larger ones, have heeded the advice, devising a “just say no” strategy to deter criminals and make themselves less of a target. At the University of California at San Diego, two recent ransomware incidents did some temporary damage. But the university refused to cave in to demands for cash. Three years ago, the university lost access to its data during an attack, but because it had backed up both its data and its systems, it was able to recover them on its own within a week. About 18 months ago, a targeted breach centered on the work of one research faculty member. The researcher lost some data, though the loss wasn’t considered catastrophic. San Diego has since made strong efforts to persuade its research faculty members to back up their data in a safe place. The university created a website with instructions on how to do that. It also started a separate datamanagement plan for researchers to follow. Still, officials at some institutions who
an emerging threat : ransomware 3
have promised never to pay criminals admit that there may be some circumstances in which that stance becomes less absolute, such as when students’ medical information has been stolen and a threat has been made to publish it online. Even among institutions that have pledged never to give in to demands, there is a belief that there might, one day, be a particular case that offers a reason to pay out, especially if a college lacks insurance against ransomware attacks.
Many colleges have gotten the word out that, no matter how far down in the tech hierarchy staff members or students might be, they should be on the lookout for nefarious online schemes.
Training and Communications At several colleges, IT staffers run tabletop exercises for academic department members and students as well as administrators. The goal is to learn how much they know about the threat of ransomware, and to test their reactions to simulated ransomware-borne denial-of-service attacks. The websites of the University of Michigan and Pennsylvania State University offer examples of phishing expeditions, so that students know what to look for and how to respond. The Penn State site also includes videos of what people on campus can do to avoid allowing ransomware hackers to enter a system. Many colleges have gotten the word out that, no matter how far down in the tech hierarchy staff members or students might be, they should be on the lookout for nefarious online schemes. A chain of communication following an attack is also important, and has become a part of many institutions’ hacker-response strategies. Some colleges maintain an “escalation policy” that lays out in detail which campus officials should be contacting others, who receives certain kinds of messages, and in what order. Colleges
have also made contingency plans for when their email is down, such as using automated phonecalling, text alerts, and social-media blasts to reach staff members and students when a campus system is held hostage by ransomware.
Improving Security Several institutions report working harder to make their IT systems safe from attacks. At the University of California at Berkeley, a virtual private network was created with several safeguards. To remotely access it, Berkeley users must authenticate their credentials to get through several firewalls. Such measures, the university hopes, will make it much tougher for attackers to get through. Other colleges are doing something similar by expanding requirements that people on campus use multifactor authentication to gain access to networks. Larger universities frequently employ system patches, antivirus software, and common decryption keys that can free a system from ransomware. Others are beefing up their backup systems so they can replicate their main systems if ransomware takes them down. Many institutions report that they regularly test their systems against attacks. And some have taken the step of removing their campus directories, or at least parts of them, from webpages to make it harder for ransomware attackers to send infected emails en masse. Still, IT experts warn that many colleges, particularly smaller ones, aren’t availing themselves of modern cybersecurity solutions. Tech offices at institutions with budget trouble are especially vulnerable — something that could intensify as Covid-19 forces colleges to cut costs further, including by eliminating some security personnel.
Insurance While not protecting institutions against attacks, insurance policies typically can offer institutions a way back after one. After a college uses money from an insurance claim to pay off ransom demands, attackers usually remove the virus, freeing up an institution’s network. By law, if an insurance policy covers damage by
an emerging threat : ransomware 4
ransomware, insurers must respond to a college’s claim, even if that means paying it for damages. Cyber insurance companies have mushroomed in the past decade, according to one IT expert, who adds that more than $2 billion has been paid out in ransomware claims of all types (including colleges) in recent years. Purchasing a cyber insurance policy is the most common way colleges deal with possible ransomware, according to a survey of chief information officers and chief information security officers conducted by the Leadership Board of CIOs (LBCIO). The survey also found that 76 percent of higher-ed institutions now carry insurance against ransomware disruptions, up from 63 percent in 2018. Though such policies can offer a way out of danger, some experts worry that they also bring some peril. Cyberattackers who learn that an institution is insured might see it as a better opportunity. Buying insurance presents other caveats as well. For one, there is no guarantee that paying a ransom will result in the full return of an IT system. Colleges that negotiate with criminal enterprises are relying on them to be honest about the delivery of decryption keys, or the extent to which such keys will actually restore control of their original systems.
Outside Audits While most colleges rely on their chief
information officers and chief information security officers to make the technical calls to fend off ransomware attacks, some have opted to invite outside experts to assess their systems or provide continuing oversight. While on-campus professionals can develop plans and policies that make it harder for cybercriminals to commandeer a college’s computing and data systems, issues of campus culture can prevent those officials from creating and enforcing rules on how faculty and staff members and students should behave online. Some CIOs are regularly frustrated by faculty members who download unsafe software or who don’t report such actions to the IT office. Having an outside check on the system can lead to stronger, more enforceable policies, some college leaders believe. Outside experts can feel freer to monitor weak points in a system and make suggestions as to how to keep stakeholders in line with IT-security goals. In the past decade, the proportion of college-IT officials who have contracted with outside tech auditors has grown from 55 percent to 71 percent, according to the LBCIO survey. Among those institutions now planning to make third-party IT audits a regular part of their security regimen is Monroe College, which will soon retain an outside vendor in the hope that it can avoid the embarrassment and expense it suffered one year ago.

1. You are a consultant in charge of creating a Business Continuity Plan (BCP) for UALR. Based on the article what will be your focus, given the prevalent of cyber-attacks at institutions of education. Identify an area that you will focus on to prevent ransomware attacks and devise a plan so that when it happens you have a strategy to recover. Explain the reason for focusing in this area/ Explain why that area is important to institutions of education such as UALR (30 points)

2. Using paper and pen technology to store records and document process poses threats to Personally Identifiable Information (PII) . Identify 2 examples of PII and use the template below to perform a risk assessment of Personal Identifying Information (PII) stored by institutions of education, such as UALR. Using the template provided evaluate, and assess threats, vulnerabilities, risks, and Maximum Tolerable Downtime (when these PII will be inaccessible) (40 Points)
Threats : What an organization is defending itself against, e.g. a natural disaster, man-made disasters.
Vulnerabilities : The gaps or weaknesses in the IT infrastructure that undermine an organization’s IT security efforts, e.g. a firewall flaws that lets hackers into a network. Lack of employee training, ineffective BCP, flawed processes etc.
Risks : Calculated assessment of potential threats to an organization’s security and disruption of operations and the vulnerabilities within its information systems infrastructure.




Risk Assessment Template

Type of PII Threats Vulnerabilities Risks MTD

3. Based on your risk assessment and recommended Maximum Tolerable Downtime (MTD), make recommendation for Recovery Time Objective (RTO) and Alternate Processing Sites ( Cold, Hot, Warm, Mobile) to achieve the RTO . Explain why you selected that alternate processing site

In: Computer Science

Please write in x86 Assembly language on Visual Studio. IRVINE32 Write a program to copy one...

Please write in x86 Assembly language on Visual Studio. IRVINE32

Write a program to copy one array of size 24 to another array of size 24 using string instructions. Write 3 versions of this code. One code must copy byte at a time. One code must copy word at a time and one code must copy double word at a time. Cut and paste the array in memory to show your code is working.

In: Computer Science

•What is the significance of ranking the vulnerabilities by severity level? •What is the significance of...

•What is the significance of ranking the vulnerabilities by severity level?

•What is the significance of the Executive Summary in the Nessus Essentials report?

In: Computer Science

In C programming, I am trying to search for the names of people that in this...

In C programming,

I am trying to search for the names of people that in this DOISigned.txt file, however I am having trouble getting the first and last names of the multiple people named john, my current code only searches for John once and then it terminates,here is my current code

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define BUF_SIZE 0x3000
char buf[BUF_SIZE];
int main()
{
   char* inputFile = "DOISigners.txt";
   FILE* fp;
   fp = fopen(inputFile, "r");
   if (!fp)
   {
       char errorMsg[256] = "Could not open error file ";
       strcat(errorMsg, inputFile);
       perror(errorMsg);
       getchar();
       exit(-1);
   }

   int size = fread(buf, sizeof(char), sizeof(buf), fp);
   buf[size] = '\0';                                              
   fclose(fp);

#define NUM_NAMES 3
   char* namesToSearchFor[NUM_NAMES] = { "John" };
   char* stringToSearch = "J";
   int length = strcspn(stringToSearch, ",");
   for (int i = 0; i < NUM_NAMES; i++)
   {
       char* start = strstr(buf, namesToSearchFor[i]);
       if (start != NULL)
       {
           printf("%s\n\n", namesToSearchFor[i]);
       }
   }
   getchar();
   exit(0);
}

and here is from the .txt file

Georgia: Button Gwinnett, Lyman Hall, George Walton

North Carolina: William Hooper, Joseph Hewes, John Penn

South Carolina: Edward Rutledge, Thomas Heyward, Jr., Thomas Lynch, Jr., Arthur Middleton

Massachusetts: John Hancock

Maryland: Samuel Chase, William Paca, Thomas Stone, Charles Carroll of Carrollton

Virginia: George Wythe, Richard Henry Lee, Thomas Jefferson, Benjamin Harrison, Thomas Nelson, Jr., Francis Lightfoot Lee, Carter Braxton

Pennsylvania: Robert Morris, Benjamin Rush, Benjamin Franklin, John Morton, George Clymer, James Smith, George Taylor, James Wilson, George Ross

Delaware: Caesar Rodney, George Read, Thomas McKean

New York: William Floyd, Philip Livingston, Francis Lewis, Lewis Morris

New Jersey: Richard Stockton, John Witherspoon, Francis Hopkinson, John Hart, Abraham Clark

New Hampshire: Josiah Bartlett, William Whipple

Massachusetts: Samuel Adams, John Adams, Robert Treat Paine, Elbridge Gerry

Rhode Island: Stephen Hopkins, William Ellery

Connecticut: Roger Sherman, Samuel Huntington, William Williams, Oliver Wolcott

New Hampshire: Matthew Thornton

In: Computer Science