Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ programming fundamental Q1 write the code of the following C++ programing fundamentals. 1 Write a function int Count Char( char carray(), charc); Such that
c++ programming fundamental
Q1 write the code of the following C++ programing fundamentals. 1 Write a function int Count Char( char carray(), charc); Such that it finds and returns the number of times char c occurs in char array names carray(). For example CountChar("lazy man",'a'); should return 2 because character 'a' occurs 2 times in the null-terminated array "lazy man". Similarly CountChar("lazy man,'b') should return 0, since b does not occur in given carray. 2 a) What is the formula to find distance between two 2 D points? b) What is the formula to find distance between two 3 D points? c) Write a struct Point3D, and also write three functions, first Point3D InputP3D(); to input a 3D point from user, second float Distance 3D(Point a, Point b); to return distance between two 3D points, and third void Output(Point a); to output point coordinates on screenStep 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