Write a function int sumIf(int a, int b) in C that returns t…

Write a function int sumIf(int a, int b) in C that returns the sum of non-negative ints a and b with the following conditions: If the number of digits in the sum is same as a, return the sum. Otherwise, if the sum has more digits than a, just return a without b.  Write a helper function int d( int n) that returns the number of digits in the non-negative int n, then sumIf(a, b) = a + b if d(a + b) = d(a) sumIf(a, b) = a if d(a + b) > d(a) sumIf(a, b) = b if d(a + b) < d(a) // This condition will never be reached Examples sumIf(45, 10) -> 55 // since d(45+10) = 2 and d(45) = 2, there sumIf(45, 10) = 45 + 10 sumIf(99, 2) -> 55 // since d(99+2) = 3 and d(45) = 2, therefore sumIf(99, 2) = 99 sumIf(0, 5) -> 5 // since d(0+5) = 1 and d(0) = 1, therefore sumIf(0, 5) = 5

Consider a triangle made of circles arranged in rows, such t…

Consider a triangle made of circles arranged in rows, such that the nth row in the triangle contains n circles as shown in the figure below. For example in T3 = 6, the first row has 1, second row has 2, and the third row has 3 circles, with the total number of circles to be 6.  Write a recursive function int triangle(int n) that returns the total number of circles in a triangle containing n rows. You must use recursion. Iterative solution will receive 0 marks for this problem.

True or False:  Results of the meta-analysis conducted by P…

True or False:  Results of the meta-analysis conducted by Peijnenborgh et al. (2016), indicated that when using computer-based programs to improve working memory, they worked best with children over 10 years of age and primarily with children who had attention deficit hyperactivity disorder (ADHD).

A company uses a special screw. The company gets screws from…

A company uses a special screw. The company gets screws from three different Manufacturers. If a screw is defective, it will cause damage in production in company. (Note, that the third column in table has conditional probabilities.) If a screw is found to be defective, what is the probability that it came from Manufacturer C. (conditional probability)