Question: Write a C program . 1)Write a function that takes a string str as parameter. The function must return the length of the longest block

Write a C program .

1)Write a function that takes a string str as parameter. The function must return the length of the longest block (consecutive characters) that str starts with and that contains equal number of small and capital letters. Example: If the string: heLLo WorlD. then the longest block is :heLLo W so it should return 7.

Note: ASCII code of A : 65 and ASCII code of a: 97

2)Assume that following constants and types are already defined:

#define TERMCOUNT 5 typedef int Term[2]; // A term of the polynom.

// term[0]: Coefficient

// term[1]:Degree

// Ex: {1,2} -> x^2

typedef Term Polynom[TERMCOUNT]; // A polynom that contains 5 terms

// for example: x^6+ x^4+ x^3 + 2x - 5

Write a function that takes a term t and a polynom p as a parameter. The function should multiply p with the term t and write the result into p.

Example: p: x^3 + 2x + 5 and t: 2x then p becomes: 2x^4 + 4x^2 + 10x

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!