Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Develop a function called W3_Q1 taking 2 integer pointers and swap 2 integers. The return type of the function should be void. 2.

 


1. Develop a function called W3_Q1 taking 2 integer pointers and swap 2 integers. The return type of the function should be void. 2. Develop a function called W3_Q2 that takes an integer pointer to an array and the size of the array. The function multiplies all elements within the array by 2. 3. Develop a function called W3_Q3 that takes two 3 by 3 matrices and returns the product of these 2 matrices. Note: Product of 2 matrices are: 1 1 - - 1 Matrix 1 2 2 2 Matrix 2 2 2 2 3 3 3 3 3 3 1*1+1*2+1*3 1*1+1*2+1*3 1*1+1*2+1*3 Matrix 1 2*1+2*2+2*3 2*1+2*2+2*3 2*1+2*2+2*3 Matrix 2 3*1+3*2+3*3 3*1+3*2+3*3 3*1+3*2+3*3 6 66 Matrix 1 12 12 12 Matrix 2 JavaTpoint 18 18 18 4. Write a string search function with a declaration of char *W3_Q4 (string s, const char f); which returns a pointer to first occurrence of character f in strings (and nullptr otherwise).

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

C++ Primer Plus

Authors: Stephen Prata

6th Edition

978-0321776402, 0321776402

More Books

Students also viewed these Programming questions