c programming questions

Oct 18th, 2014
Price: $30 USD

Question description

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 3x3 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 3

Write 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 re

ad the input of the user.

Tutor Answer

(Top Tutor) Daniel C.
School: New York University

Studypool has helped 1,244,100 students

Review from our student for this Answer

Oct 19th, 2014
"Thank you, Thank you, for top quality work, this is your guy!!"
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1820 tutors are online

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors