1. Write a function to display the sum of two numbers in the following ways:
By using (i) pass by value (ii) pass by address
a. function with argument and with return value
b. function with argument and without return value
c. without argument , with return value
d. without argument , without return value
Note: Use pass by address.
I need testPalindrome and removeSpace #include <stdio.h> #define SIZE 256 /* function prototype */ /* test if the chars in the range of [left, right] of array is a palindrome */ int testPalindrome( char array[], int left, int right ); /* remove the space in the src array and copy it over to the "copy" array */ /* set the number of chars in the "copy" array to the location that cnt points t */ void removeSpace(char src[], char copy[], int *cnt); int main( void ) { char c; /* temporarily holds keyboard input */ char string[ SIZE ]; /* original string */ char copy[ SIZE ]; /* copy of string without spaces */ int count = 0; /* length of string */ int copyCount; /* length of copy */ printf( "Enter a sentence:\n" ); /* get sentence to test from user */ while ( ( c = getchar() ) != '\n' && count < SIZE ) { string[ count++ ] = c; } /* end while */ string[ count ] = '\0'; /* terminate string */ /* make a copy of string without spaces */ removeSpace(string, copy, ©Count); /* print whether or not the sentence is a palindrome */ if ( testPalindrome( copy, 0, copyCount - 1 ) ) { printf( "\"%s\" is a palindrome\n", string ); } /* end if */ else { printf( "\"%s\" is not a palindrome\n", string ); } /* end else */ return 0; /* indicate successful termination */ } /* end main */ void removeSpace(char src[], char copy[], int *cnt) { } int testPalindrome( char array[], int left, int right ) { }
main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) }
5 Answers Amazon, HCL, Thought Works,
What is volatile in c language?
what is the associativity of bitwise OR operator?
Is it cc or c in a letter?
What is the process to generate random numbers in c programming language?
Which command is more efficient? *(ptr+1) or ptr[1]
what is the difference between strcpy() and memcpy() function?
print a "hello" word without using printf n puts in c language
what are two categories of clint-server application development ?
How can I find out the size of a file, prior to reading it in?
Why doesnt the call scanf work?