Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

countEvensTest YES Run this, and you will see all the tests fail. YOU NEED TO FIX THE countEvens function and then get all these tests

image text in transcribed

image text in transcribed

image text in transcribed

countEvensTest YES Run this, and you will see all the tests fail. YOU NEED TO FIX THE countEvens function and then get all these tests to pass. You will want to #include "utility. h" at the top of your file to use your completed functions 1 #include "utility,h" 2 #include 3 #include 4 5 Int countEvens (int at], int size) 6 return 42; 17 STUB! Replace with correct code. include "utility.h" #include "tddFuncs.h" int main) int fiveThrees51-13,3,3,3,3); assertEquals (0, countEvens (fiveThrees,5), "countEvens(fiveThrees,5)") int zeros[31-e,e,0; // initializes all elements to e assertEquals (3, countEvens (zeros,3), "countEvens (zeros,3)"); int fiveInts[51-1,2,3,4,5 assertEquals(2, countEvens (fiveInts,5), "countEvens (fiveInts,5) int empty[] {}; assertEquals(e, countEvens (empty,0), countEvens (empty,0)" ); int primes] 12,3,5,7,11,13,17,19,23,29; assertEquals (1, countEvens (primes,10), countEvens (primes,10) int meaning]142; assertEquals (1, countEvens (meaning,1), countEvens (meaning,1) int mix[101--42,12,-9,56,123,32767,48; 11 last three wil1 be zero assertEquals (7, countEvens (mix,10), "countEvens (mix,10)" ); return 0

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

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions