c programming questions

Task 1  Write a program that reads two strings from the command line. The user should have the possibility of: a) Concatenating the two strings  NOTE: Use strcat from the C library. b) Comparing two strings.  Implement your own strcmp function. NOTE: It is not allowed to use any function from the C string library. Task 2 ( Write a program that fills a 3×3 matrix with random numbers containing the values from 0 to 9. The program should print the generated matrix.Furthermore, the user should have the possibility to replace a certain number inside the matrix. For example, if the user enters number two then all elements having the value two are replaced by a second entered number.In addition the program should print out all the positions of the elements that have been replaced.The program should have a function  for -the initialization of a matrix -printing a matrix -replacing the number(s) inside the matrix NOTE: The declared arrays should not be global. Task 3Write a program that has a structure called person with three member variables (name, age and a customer ID number). Reserve memory for three persons by using the malloc function. The program asks the user to enter the data for three persons. After all data have been entered the program saves the entered data in a text file. NOTE: Use the gets(….), or fgets(…) function to read the input of the user.

Looking for this or a Similar Assignment? Click below to Place your Order

Open chat