Page 252 - C++
P. 252
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
) + PQR-
* +* PQR-
S +* PQR-S
) + PQR-S*
/ +/ PQR-S*
T +/ PQR-S*T
) + PQR-S*T/
) PQR-S*T/+
OR
INFIX STACK POSTFIX
( (
P ( P
+ (+ P
( (+( P
Q (+( PQ
- (+(- PQ
R (+(- PQR
) (+ PQR-
* (+* PQR-
S (+* PQR-S
/ (+/ PQR-S*
T (+/ PQR-S*T
) PQR-S*T/+
(½ Mark for conversion upto each operator illustrating through stack)
OR
(1 Mark for only the final answer as PQR-S*T/+)
4. (a) Aditi has used a text editing software to type some text. After saving the article as 3
WORDS.TXT, she realised that she has wrongly typed alphabet J in place of alphabet I
everywhere in the article.
Write a function definition for JTOI() in C++ that would display the corrected version of
entire content of the file WORDS.TXT with all the alphabets “J” to be displayed as an
alphabet “I” on screen.
Note: Assuming that WORD.TXT does not contain any J alphabet otherwise.
Example:
If Aditi has stored the following content in the file WORDS.TXT:
WELL, THJS JS A WORD BY JTSELF. YOU COULD STRETCH THJS TO BE
A SENTENCE
The function JTOI() should display the following content:
WELL, THIS IS A WORD BY ITSELF. YOU COULD STRETCH THIS TO BE
Page #11 of 28