Programming in C, Autumn 2007
Exercise 5
Oct. 5 2007
Write a function that searches a given character. The function has as parameters a string and a character. The function returns a pointer to the first occurence of the searched character in the string. If the character is not found NULL is returned. Write also a main program from where the function is called.
Write a functionvoid fill (char *p, int n, char pat), to initialize n bytes of memory with the value pat, starting at address p.
Write a program that takes a command line argument representing a number in Roman notation (for example, MXLIV) and outputs this number in standard notation. Consider only values less than 1000.
Write a program find that takes as command line arguments a file name and a string (find file1 Java). Program prints all those lines that have the given string.
.