GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Programming  >  C++

 Print  |  
Question:  Suppose there is a txt file with following format:

Student name Grades in subjects
X ABA+CDA+
Y B+CAA+AA

there can be many students with there grades in various subjects.
(number of subjects are unknown)
Possible values of grade are: A, A+, B, B+, C, D

now suppose the file gets corrupted and all '+' are replaced by 'A'

Write a program to restore the file





July 07, 2007 03:05:20 #1
 Indrajit   Member Since: Visitor    Total Comments: N/A 

RE: Suppose there is a txt file with following format:...
 
Since the number of subject for a perticular student is unknown and A is a valid grade, If a + symbol is replaced by a A then it would be impossible to find out without any other correct source of the same student's grades that the "A" there is occuring by mistake.

Hence it is impossible to write the programm.
     

 

Back To Question