Q1. Assume X is an array of char such that cahr X[] = “welcome C++II students to pointer camp, come and see the power and comfortable of pointers when it is combined with array. Enjoy camping and find common things between arrays and pointer commands”; Write a function that receives the array X and returns array of pointers to char. Each pointer in this array points to array of char (one word) that contains the phrase “com”. For example the array X has 6 words that each one contains the phrase “com”, they are [welcome, come, comfortable, combined, common and commands], so array of 6 pointers are returned each pointer in the returned array points to a word. Hint: if no words has the phrase “com” a NULL pointer should be returned don't use strstr()... you must write code for this function #in c++

Question

Q1. Assume X is an array of char such that

cahr X[] = “welcome C++II students to pointer camp, come and see the power and comfortable of pointers when it is combined with array. Enjoy camping and find common things between arrays and pointer commands”;

Write a function that receives the array X and returns array of pointers to char. Each pointer in this array points to array of char (one word) that contains the phrase “com”. For example the array X has 6 words that each one contains the phrase “com”, they are [welcome, come, comfortable, combined, common and commands], so array of 6 pointers are returned each pointer in the returned array points to a word.

Hint: if no words has the phrase “com” a NULL pointer should be returned

don't use strstr()... you must write code for this function

#in c++

Expert Answer

1 Rating

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Engineering

Programing

Related Computer Engineering Q&A

Find answers to questions asked by students like you.

Q: Define cooperative thread array.

A: Cooperative Thread Array (CTA): General Purpose Graphics Processing Unit (GPGPU) applications are u...

Q: Create a Java program with a method that searches an integer array for a specified integer value (se...

A: Programming instructions: First, create an array and initialize it. Then, take input from the user ...

Q: Ceng X y! ccm blackboard X Bb HOMEWORK- X Bb Tirrito CMP130 New Tab tml?deploymentld%359531118568315...

A: From the given information, one can identifies the internal components of a computer as follows. Au...

Q: Assume 185 and 122 are signed 8-bit decimal integers stored in sign-magnitude format. Calculate 185 ...

A: For subtracting the two-given number: Converting the given numbers in binary. Subtracting the given...

Q: Which cabling technology can travel the greatest distance?     a. twisted pair     b. co...

A: The answer is (c), that is, the fiber. The fiber cable, also known as optical fiber cable, can be al...

Q: Categorize slack as an example of Web 1.0 (ebusiness) or web 2.0 (buseiness 2.0)

A: Web 1.0 It refers to the internet with flat data. It mainly deals with static pages. Limited intera...

Q: Hello, I have a javaScript theoretical question. Could you help me with this?  My question is: Expla...

A: One technique to troubleshoot a bugged JavaScript program: One technique to troubleshoot a bugged J...

Q: Write a method named sumInts that can take a variable number of int arguments and return the sum of ...

A:  Program Approach: Import the essential Java Packages. Define the Main method. Define the sumInts m...

Q: Please explain the following concepts. Pipelining. Pipeline Hazards. Forwarding.

A: Pipe lining It is an implementation technique where multiple elements are overlapped in execution. ...

Q: Compilers can have a profound impact on the performance of an application. Assume that for a program...

A: a) Execution time of compiler A=CPU time of compiler A=1.1 s Execution time of compiler B=CPU time ...

Q: Explain structure of a Verilog program.

A: Verilog program: Verilog is a programmable language code that can be used and reused within a singl...

Q: You buy a chip that is 32Kx8. How many memory locations does the chip have?

A: Answer = 32K

Q: Write a function that takes in three numbers as parameters and prints out the largest of the three. ...

A: Program Instruction: Create a driver class Main with the main() function for execution. Prompt user...

Q: I am having a problem with my static casting. I keep getting only one response no matter what values...

A: The result is static type casted but the variable fatPercentage declared as int. So, after the succe...

Q: 1. What is the likely data sparsity of the EMP_SEX column? 2. What indexes should you create? Write ...

A: Data Sparsity: If a table has 30 % of the cells filled with data, then it is 30% dense and 70 % spa...

Q: Create an ArrayList of strings to store the names of celebrities or athletes. Add five names to the ...

A: Following is the java program:   Approach: An ArrayList(sting type) is defined. Names of celebritie...

Q: Define floating-point.

A: Computer systems recognize real values as floating-point values that contain fractions. If a calcula...

Q: Provide the type and hexadecimal representation of following instruction: sw $t1, 32($t2)

A: Calculation: In this instruction, “sw” represents the opcode, “$t1” represents the value of destina...

Q: Suppose your company has leased one Class C license, 120.10.10.0, and wants to sublease the first ha...

A: CIDR notation is basically a compress representation of the IP address as well as its linked routing...

Q: What is DBMS?Write its advantages and disadvantages.

A: DBMS is abbreviated as a database management system. It is a series of programs that maintain the da...

Q: Explain what is meant by the term data redundancy with the help of two tables of data.

A: Data redundancy:It means repetition of same data in the computer storage memory.It causes wastage of...

Q: We need to create a database for the Circulation Department of a public library. The database will s...

A: The database schema would have the following structure (primary keys are italicised and foreign keys...

Q: only 4

A: Given:  It is given that, n=pq=23761939 ……(1) Then, Eve also know (p-1)(q-1)=23752000.  

Q: how to make a page break on a word document.

A: The following are the steps to insert a page break in word document: Put the cursor where you want ...

Q: You just bought a new-to-you car, and it comes with a media system that can sync with your iPhone. Y...

A: Given information: -  A new car that has a media system to connect and synchronize with the iPhone. ...

Q: Define PCI-Express.

A: The abbreviation for PCI-Express is “PCI-e”. It is a high speed serial bus standard planned for the ...

Q: 3) Assume that we have a UART that has a transmission speed of up to 10MBps (Mega Bytes per second) ...

A: Transmission speed=10 MBps 3.1) calculating the bit per second transmission rate. Here, we get that...

Q: What decimal number does the bit pattern 0×0C000000 represent if it is a floating point number? Use ...

A: Given case: Here in the given case, Sign bit is “Positive”. Exponent bits are “00011000”, which is ...

Q: Explain Addressing modes.

A: Addressing modes Addressing modes are an aspect of instruction set architecture in most central pro...

Q: What is difference between RAM and ROM?

A: RAM is abbreviated as Random-Access Memory.It is used for real-time storing of programs and data use...