Complete the code to filter users with age greater than 18.
var adults = users.Where(u => u.Age [1] 18);
The 'Where' clause filters users whose Age is greater than 18, so the operator should be '>'.
Complete the code to filter products with price less than or equal to 100.
var affordable = products.Where(p => p.Price [1] 100);
The 'Where' clause filters products priced at 100 or less, so the operator should be '<='.
Fix the error in the code to filter orders with status 'Completed'.
var completedOrders = orders.Where(o => o.Status [1] "Completed");
To filter orders with status exactly 'Completed', use the equality operator '=='.
Fill both blanks to filter employees older than 30 and in the 'Sales' department.
var salesTeam = employees.Where(e => e.Age [1] 30 && e.Department [2] "Sales");
The filter selects employees older than 30 (using '>') and in the 'Sales' department (using '==').
Fill all three blanks to filter books published after 2000, with more than 300 pages, and author is 'Smith'.
var selectedBooks = books.Where(b => b.Year [1] 2000 && b.Pages [2] 300 && b.Author [3] "Smith");
The filter uses '>' for Year and Pages to select books after 2000 and with more than 300 pages, and '==' to match author 'Smith'.