In the following pgm add a stmt in the function fun such
that the address of

'a' gets stored in 'j'.

main(){

int * j;

void fun(int **);

fun(&j);

}

void fun(int **k) {

int a =0;

/* add a stmt here*/

}



In the following pgm add a stmt in the function fun such that the address of 'a�..

Answer / susie

Answer :

*k = &a

Explanation:

The argument of the function is a pointer to a pointer.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Code Interview Questions

void main() { int const * p=5; printf("%d",++(*p)); }

3 Answers   Infosys, Made Easy, State Bank Of India SBI,


How we print the table of 2 using for loop in c programing?

14 Answers   HCL, Wipro,


Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }

1 Answers  


Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.

16 Answers   Aricent, Cisco, Directi, Qualcomm,


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.

6 Answers   Fusion Systems GmbH,






Develop a routine to reflect an object about an arbitrarily selected plane

0 Answers  


#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }

1 Answers  


Question: We would like to design and implement a programming solution to the reader-writer problem using semaphores in C language under UNIX. We assume that we have three readers and two writers processes that would run concurrently. A writer is to update (write) into one memory location (let’s say a variable of type integer named temp initialized to 0). In the other hand, a reader is to read the content of temp and display its content on the screen in a formatted output. One writer can access the shared data exclusively without the presence of other writer or any reader, whereas, a reader may access the shared memory for reading with the presence of other readers (but not writers).

1 Answers  


How can i find first 5 natural Numbers without using any loop in c language????????

2 Answers   Microsoft,


int a=1; printf("%d %d %d",a++,a++,a); need o/p in 'c' and what explanation too

1 Answers  


main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above

3 Answers   HCL,


what is variable length argument list?

2 Answers  


Categories