Page 34 - C++
P. 34
Write a function named Change_Item(int Id, float Pr) to modify the price of the item
whose Itemid & new price are passed as an argument.
Ans
(½ Mark for opening ITEM.DAT correctly)
(1 Mark for reading all records from the file)
(1 Mark for comparing value of Id from file & calling Set_Price() function)
(½ Mark for writing new value of price in file)
SECTION – B (Python)
Q1 (a)
Differentiate between break and continue statement with the help of an example.
2
Ans break statement is used to terminate the execution of the loop.
For example:
Page No. 17