City Guilds Model Questions Vol1 2017 Information Technology Question 15
Practice objective / multiple choice question 15 from the 2017 City Guilds Model Questions Vol1 Information Technology examination.
Consider the following function written in a C‑like language:\ \ ``` int f(int n){ int sum = 0; for(int i = 1; i <= n; i++){ int term = i; for(int j = i; j <= n; j++){ term = term * j; } sum = sum + term; } return sum; } ```\ What integer value does the function return when it is called with \(n = 4\)?
Answer Options
About This Question
This is City Guilds Model Questions Vol1 2017 Information Technology Question 15. It is one of the objective questions from the 2017 City Guilds Model Questions Vol1 Information Technology examination.
Difficulty level: Hard .
Master the Exam!
You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.