Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

first pic question 2nd and 3rd answer u give here and i tried in c++ this is the result whar should i do make it

image text in transcribed

first pic question

image text in transcribed

image text in transcribed

2nd and 3rd answer u give here and i tried in c++ this is the result whar should i do make it run

image text in transcribed

2. Find the checksum and validate if there are transmission errors that occurred. Consider the data unit to be sent: 011101000100010000001111. Upload a photo of your answer sheet showing your solution. (20 points) assign1.cpp #include #include #include using namespace std; // structure defintion struct WordCount { //two data members char word[31]; int count; }; //Function to convert string upper case void stringToUpper(char *s) { for(int i=0;s[i]!='\0';i++) //repeat until end of string char null { if(*(s+i)>=97 && *(s+i)>word;//read the word while(!infile.eof()) //repeat until end of file { stringToUpper(word);//convert to upper case stripPunctuation(word);//remove punctuation characters int found=searchForWord(word, wordArray,count);//search word if(found==-1) // when not found { strcpy(wordArray[count].word, word);//store as new word wordArray[count].count=1;//first count is 1 int found=searchForWord(word, wordArray,count);// search word if(found==-1) //when not found { strcpy(wordArray[count].word,word);//store as new word wordArray[count].count=1;//first count is 1 count++;//increment count } else //when found wordArray[found].count+=1;//increment existing count infile>>word;//read the next words } infile.close();//close the file return count;//finally return count } //Function to sort words void sortWords(WordCount wordArray[],int numWords) { for(int i=0;i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

what is overhead roting in in protocols RIPNG ,OSPFv3 and EIGRP ?

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago