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.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

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, &copyCount); /* 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 ) { }

0 Answers  


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?

2 Answers   HCL, TCS,


what is the associativity of bitwise OR operator?

1 Answers  


Is it cc or c in a letter?

0 Answers  


What is the process to generate random numbers in c programming language?

0 Answers  


Which command is more efficient? *(ptr+1) or ptr[1]

3 Answers  


what is the difference between strcpy() and memcpy() function?

2 Answers  


print a "hello" word without using printf n puts in c language

6 Answers  


what are two categories of clint-server application development ?

1 Answers  


How can I find out the size of a file, prior to reading it in?

0 Answers  


Why doesnt the call scanf work?

0 Answers  


Categories