Saturday, February 9, 2013

ISC PRACTICAL QUESTION



S is a string of capital alphabets, parts of which may be enclosed in brackets ( ). S is an invalid string if the brackets are nested. For example : AXB (YPT (COM)FTY) XUP is not a valid string. Write a program to
(1) Check the validity of the input string.
(2) If the string is valid, output the given string omitting the portion enclosed in brackets.

For example : Input string : COM(IP)PUTER IS JUNK (MONK) MACHINE
Output string : COMPUTER IS JUNK MACHINE
If the string is not valid, print the string and a message “Input string is not valid” and stop.

1 comment:

Sid said...

Hi,can you plz send the solutions to the programs of icse questions in other site under topics for icse...there you have not given the solutions to the programs..
Under the section of learning programming (icse) some of the links and pgs are missing.
It will be very kind of U to look into it...