Queen Mary · ECS401U · School of Electronic Engineering and Computer Science
ECS401U Procedural Programming: exam practice questions, marked
Practise for ECS401U Procedural Programming at Queen Mary University of London with 40 quick-recall questions, 16 exam-style questions and 8 first-class stretch questions, written from the module’s published description. Write an answer and get it marked against Queen Mary’s grade bands in about 30 seconds, with the exact sentences that lost marks and three changes to reach the next class.
Try one free, no sign-up Create a free account
Example ECS401U question
(a) Evaluate each expression and give its type: (i) 5 + 3 2 (ii) 10 / 4 2.0 (iii) (double) 10 / 4 (iv) "A" + 1 + 2. [8 marks] (b) Explain why int n = 3.7; causes a compile-time error and show two ways of correcting it, stating the value n then holds. [6 marks] (c) Write a boolean expression that is true exactly when an int year is divisible by 4 but not by 100. [6 marks]
Topics covered
- Variables, Types and Expressions
- Selection and Conditional Logic
- Iteration and Loops
- Methods and Parameter Passing
- Arrays and Searching/Sorting
- Objects, Classes and Encapsulation
- Strings, Input/Output and Exceptions
- Testing, Debugging and Program Reasoning
About the module
This is an introductory module in computer programming using Java. You will learn the basic concepts of programming and learn to write and reason about simple programs.
Unizy is an independent revision tool and is not affiliated with or endorsed by Queen Mary University of London. Marks are practice estimates, not official marks.