Is reference used in C?



Is reference used in C?..

Answer / bavi

No.Oly cal by value method of passing is used in C.
Also, calling by reference can be achieved thru' Pointers.

Is This Answer Correct ?    7 Yes 2 No

Post New Answer

More C Interview Questions

How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

2 Answers  


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

0 Answers   HCL,


who is the father of c

4 Answers   Infosys,


pick out the odd one out of the following a.malloc() b.calloc() c.free() d.realloc()

2 Answers   TCS, ZenQ,


What is function definition in c?

0 Answers  






What is s or c?

0 Answers  


what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else printf("fail"); }

4 Answers  


What is static memory allocation?

0 Answers  


how to set Nth bit of a variable?

1 Answers  


Program to find the value of e raised to power x using while loop

5 Answers   IBM, N Tech,


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  


What is a null pointer in c?

0 Answers  


Categories