/*Read a line of text and write it out reversely */
#define EOF '\n'
void reverse(); /*Function prototype*/
printf("Enter a line of text:\n\n");
if((c = getchar())!=EOF)
>What any modification needed to be done?
While recursion could technically be described as a stack, I seriously doubt that's what your program requirements meant by "stack object". More likely, you're supposed to implement your own stack using an array of char.
>#define EOF '\n'
EOF is a standard name, as has already been said. There's also no reason to hide '\n' behind a macro. One might do so for two reasons:
1) The macro offers clarifying information such that a value can be more readily understood by readers. '\n' is a well known escape sequence, to the point that any reader who doesn't know what it means likely doesn't know C at all.
2) The macro offers a way to use a value such that the usage is always portable even when the value is not. '\n' is already portable across all implementations.
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...