You are on page 1of 1

Persistent

C Programs

1. From the given numbers, extract the no.s which are lower than a given value.
Suppose the file name is a001.txt which is storing values in the first line like
this.. 10,20,40,30,.............
also handle exceptions regarding cmd line args, eg:
./a.out a001.txt ------> OK
./a.out ------->Error, no i/p file
Use cmd ine args i.e . main(int argc, char *argv[ ]) { }

Oracle

1. Your i/p is a C program file. Delete all the blank lines considering all the
tabs. For eg:
#start
line1 ...............\n
\n
\t line2 ........\n
line3 ............\t...............\n
line4.............................\n
#end

o/p
#start
line1
line2
line3
line4
#end

You might also like