EssayGhost Assignment代写，Essay代写，网课代修，Quiz代考

EG1hao

#### 数学代写案例

##### 联系我们

EssayGhost高质量代写论文定制平台

QQ：3318099838

##### 数学代写案例

from the C standard math library, which returns the absolute value of x. Write a program to test this function. Note that N represents a constant. To set a value to N use the define directive at the beginning of the file (E. g.: #define N 20 replaces N by 20 all over the file, except for occurrences of N inside a string or a variable name). Write a program to test the function.linear algebra代写Write a function which prints all elements of a square matrix in a diagonal scan order, starting at the top left For instance, for the followingmatrix1       12    13        495       16    17         819       10      11     202        45    19        14the output has to be: 1 5 12 9 16 13 2 10 17 49 45 11 81 19 20 14 You have to decide the function prototype.Write a program to test the function.linear algebra代写linear algebra代写7.In linear algebra,linear algebra代写a Toeplitz matrix or diagonal-constant matrix, is a matrix in which every descending diagonal from left to right is constant (in other words, has all its elements equal). Such matrices are encountered in applications in signal processing and communications. For instance, the following 4-by-5 matrix is a Toeplitzmatrix:9    2    1    0   47    9    2    1   03    7    9    2   15    3    7    9   2Write a function with prototypeint is_toeplitz(int a[][N], intm),linear algebra代写which determines if the m-by-N matrix a is a Toeplitz matrix or not. The function has to return 1 if the answer is positive and 0 otherwise. Note that N is a symbolic constant defined at the beginning of the C file.8.Write a C function withprototypevoid letter_freq(const char word[], int freq []);This function computes the number of appearances of each letter in the string word and stores them in array freq of size 26. The letters are the 26 letters of the Latin alphabet whose ASCII values are in the range 97-122 for the lower case letters, and in the range 65–90 for the uppercase letters. You must account for uppercase and lowercase letter variants, which should be counted together. The counts have to be stored in array freq in alphabetical order of letters, which corresponds to the increasing order of their ASCII values. Specifically, freq[0] should store the count of ‘A’ and ‘a’, freq[1] should store the count of ‘B’ and ‘b’, and so on. This function has also to print the counts indicating each letter and its count on a separate line, as follows:The count of ‘A’ and ‘a’ is … The count of ‘B’ and ‘b’ is …linear algebra代写…Write a program to test the function.Hint: If variable x of type char represents a lower case letter, then the corresponding index in the array equals the integer value of x-‘a’. If x is an upper case letter, then the index in the array equals x-‘A’.9.Write a function withprototype linear algebra代写void string_copy(const char source[], char destination[], intn);This function copies string source to string destination. Parameter n represents the size of array destination. If the latter array is not sufficiently large to hold the whole source string then only the prefix of the string which has room in the latter array should be copied. Note that after copying, the null character should also be included to mark the end of string destination.linear algebra代写Write a program to test your functions.You are not allowed to use any function declared in string.h.You may write a function which returns the length of a string and use it if you need it. Recall that a string is a char array with the null character marking the end. The length of the string is the number of characters in the array appearing before the null character.10.Implement a string processing function with theprototypevoid my_strcat( const char str1[], const char str2[], char str3[], intn);The function concatenates strings str1 and str2 and stores the new string in str3 if the array str3 is large enough. Otherwise, an error message signaling this should be printed. Note that the parameter n equals the size of the array str3.Write a program to test the function.linear algebra代写Implement a string processing function with theprototype

﻿