Software Engineering
primer-original-v2mediumSoftware Engineering08 Software Testingprimer-original-v2

Determine the cyclomatic complexity for the following code: Accept year if(year mod 4=0 and year mod 100!=0) or(year mod 400 =0) print year is leap else print year is not leap end if.

Answer options

A
6
B
3
C
4
D
5

Correct answer: 4

Detailed Solution & Conceptual Analysis

This question has been retained as-is due to its unique context.

Key Engineering Takeaway

In Software Engineering, understanding the underlying mechanics of Software Engineering is critical for writing performant, bug-free production code and passing rigorous technical architecture reviews.

Related Software Engineering questions

Practice more Software Engineering questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.