Write a function named is_palindrome that accepts a string p…

Write a function named is_palindrome that accepts a string parameter and returns true if that string is a palindrome, or false if it is not a palindrome. For this problem, a palindrome is defined as a string that contains exactly the same sequence of characters forwards as backwards, case-insensitively. Spaces, punctuation, and any other characters should be treated the same as letters; so a multi-word string or string with numbers or punctuation would count as a palindrome too. Below are some sample calls Function Call Value Returned is_palindrome(“madam”) true is_palindrome(“RacCAr”) true is_palindrome(“dog god”) true is_palindrome(“123 $$ 321”) true is_palindrome(“madham”) false is_palindrome(“antena”) false is_palindrome(“Taco cat”) false is_palindrome(TACOcat) true

Demonstrate your understanding of bitwise operations by eval…

Demonstrate your understanding of bitwise operations by evaluating the following expressions and writing their results in binary. unsigned char this = 0xa5; unsigned char that = 0x97; Expression Binary Result this that this & that this | that this ^ that ~this this > 1 (that >> 2) & 17 this & ~that ~that & (this

Fill in the textboxes with the text that should go in the sp…

Fill in the textboxes with the text that should go in the spot on the same line with a _____ in the below code so that each variable is declared as the type it stores and each call to print_variable passes in an int*. Fill in the printf in print_variable so that the number stored in the parameter is printed. If a variable declaration will not work or a call is made using a variable that will not work write the word broken in the box. If no * or & are needed in a call write ok in the box.  void print_variable(int* var) { printf(“%d\n”, ______); } int main() { int a = 4; ______ b = a; ______ c = *a; ______ d = &a; ______ e = &&b; ______ f = &d; ______ g = *f; print_variable( ____a ); print_variable( ____b ); print_variable( ____c ); print_variable( ____d ); print_variable( ____e ); print_variable( ____f ); print_variable( ____g ); }

Consider the following function: void mystery(int list[], in…

Consider the following function: void mystery(int list % 2 == 0) { list++; list++; } } } In the left-hand column below are specific arrays of integers. Indicate in the right-hand column what values would be stored in the array after the call to function mystery in the left-hand column. Write your answer surrounded by curly braces with number separated by commas. Original Contents of Array Final Contents of Array int a1 int a2 int a3 int a4 int a5

Write a function called num_unique that takes a sorted array…

Write a function called num_unique that takes a sorted array of integers and an integer repesenting the length of that array as parameters and that returns the number of unique values in the array. The array is guaranteed to be in sorted order, which means that duplicates will be grouped together. For example, if a variable called list stores the following values: {5, 7, 7, 7, 8, 22, 22, 23, 31, 35, 35, 40, 40, 40, 41} then the following call num_unique(list, 15) should return 9 because this list has 9 unique values (5, 7, 8, 22, 23, 31, 35, 40 and 41). It is possible that the array might not have any duplicates. For example if list instead stored this sequence of values: {1, 2, 11, 17, 19, 20, 23, 24, 25, 26, 31, 34, 37, 40, 41} then a call on the function would return 15 because this list contains 15 different values. If passed an empty array, your function should return 0. Remember that you can assume that the values in the array appear in sorted (nondecreasing) order. You are not allowed to use a temporary array, string or struct to solve this problem and you are not allowed to call library functions to help you solve it.

For each call to the following function, indicate what value…

For each call to the following function, indicate what values are printed and returned: int mystery(int n, int m) { if (n == 0 || m == 0) { printf(“-“); return 0; } else if (n % 10 == m % 10) { printf(“1”); return 1 + mystery(n / 10, m / 10); } else { printf(“0”); return mystery(n / 10, m / 10); } } Call Output Returned value mystery(18, 0); mystery(8, 18); mystery(25, 21); mystery(305, 315); mystery(20734, 1724);