Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is my assignment question programming language C .. just make a main to call all functions. Question 2 Twitterlyzer: 20 marks True (or 1)
This is my assignment question programming language C .. just make a main to call all functions.
Question 2 Twitterlyzer: 20 marks True (or 1) if the input twoot is a roply and Falsa (or 0) atherwiso NOTE: you may use cither a bool OR int as the return typa. isTw char Ibool OR char it isTweetAlReply Prince Harry and @michelleobama made a surprise visit'l returns False lor 0) This question is based on the social network site Tvitter. Twitter is an online news and social networking service where users post and interact with messages called "tweets", restricted to 140 charartes Wikipeai] xampla: isTuwoetARoply michollaabama-thanks for tho surprise vislt 1) roturns Truo (or Some useful terms: . Tweet is a message posted on Twerh is between1 and 140 characters lon usive) For this assignment, we assume that a tweet can have a ninimum of 1 and a maximum of 60 characters only . Username 's the nane of g Twitter user. For example, niche 11eobem. 1sa usemme. For this assignmeut, any text without spaces is a valld usernane .Mention is a tweet that includes the character, followed by usemame. For example, the tweeterince tn: ry nd en: the 11eobame isa mention ofthe Twitter user nichelleoban. . Reply is a tweet that is posted m response to another user's tweet. A reply tweet starts by mentioning the other user. For example. @michelleobans, you are lways right ! is a reply. is tunction takes 3 strings as parameters (c-g. twect1, twect2 and result). It sTweet 1 in result if tweet 1 is shorter than tweet2, stores Tweet 2" in It if tweet2 is shorter than tweet1, stores "Sarne lerigth in result if they have shorterTweet e same lerigth char lJ, char J. char I> void e char rcsult 120]: le1: shortest ab:", "defg", result] stores Tweet1 in result Exarnple2: report shortest"abcd", "defs, result) stores "Same length" in result What to do Exampled: report shortest"abcd", eg, result) stores "Tweet 2" in result Roturns the numher of twoets requirod in arder to tweot all af messago so that no Conplete the fuction defimitions for the four functions riven in the table below. You MUSTuse the signature that is given in the table for each of the functions -DO NOI cbange the signature you will not be graded if you e t is longerthan MAX TWEET LENGT the given signatures. Use the function design recipe that we Example 1: num tweets requiredl Prince Harry and @michelleobama made a surprise visit') returns 1 have been leamine in class. You must test these fnctions before submittine numT Function names, their signature and description: Function name: Parameter types) -> Return type char-int Examplo 2: num twects_requiredl Prince Harry and micheleobama made a surprise visit to students at Hyde Park Academy in Chicago") returns 2 Description (Assume MAX TWEET LENGTH- 60) Returns True (or 1jif the tweet is a valid tweet and False(or 0) otherwise. A tweet is valid if it contains between 1 and MAX TWEET LENGTH characters inclusive) NOTE: you rmay use either a bool OR int as the return type. charbool OR Example1: isvalid Tweet("Prince Harry and @michelleobama.] returns Truelor 1 char -it Example2:is_valid_tweeti returns False (or 0)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started