Hey i am abit confuse here. as i want to clarify something on this
IO:SEEK_CUR. For example i have a hoho.txt contains “sure”. and i
execute this code.
f = File.new(“hoho.txt”,“r”)
while a = f.getc
puts a.chr
f.seek(1, IO::SEEK_CUR)
end
The ans prints out:
s
r
isn’t ‘u’ should be printed instead of ‘r’? because 1, means after the
character ‘s’, so it will be ‘u’ isn’t it?