How will you allocate memory to a double pointer ?

Answers were Sorted based on User's Feedback



How will you allocate memory to a double pointer ?..

Answer / guest

stack over flow

Is This Answer Correct ?    8 Yes 0 No

How will you allocate memory to a double pointer ?..

Answer / samson chettri

stack over flow.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

write a program to find out prime number using sieve case?

0 Answers   HCL,


main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??

19 Answers   EBS, Ramco, Sangwin, TCS,


1. Duplicate the even numbers. -1 Sample I/O Array1:- 4,2,24,3,22 Updated Array:- 4,4,2,2,24,24,3,22,22 2. Reverse the array in a region - 1 Sample I/O Array1:- 4,2,24,3,22,41,21 Enter Region:- 2,5 Update Array:-4,41,22,3,24,2,21 3. Store first the even digits in an array and then odd digits in same array -2 Sample I/O Array1:- 4,2,24,3,22,41,21 Array 2:- 4,2,2,4,2,2,4,2,3,1,1 4. Store the count of the digits in all numbers in an array and print the count. -2 Sample I/O Array1:- 4,2,9,3,7,41,28 Array 2:- 0,1,1,1,2,0,0,1,1,1 1-1;2-1;3-1;4-2;7-1;8-1;9-1 5. Store all palindrome numbers in to another array -2 Sample I/O Array1:- 4,22,9,313,7,141,28 Array 2:- 4,22,9,313,141 6. Arrange the array in such a way that odd numbers come first and then even numbers -1 Sample I/O Array1:- 4,22,9,313,7,141,28 Update Array1:- 9,313,7,141,4,22,28 7. Store into another array by inserting it in the right place - 2 Sample I/O Array1:- 4,22,9,313,7,141,28 Array2:- 4 /4,22 /4,9,22 /4,9,22 ,313 /4,7,9,22 ,313 /4,7,9,22 ,141,313 / 4,7,9,22,28 ,141,313 8. Merge two sorted arrays in a sorted fashion - 3 Sample I/O Array 1:- 3,6,7,9,11,16 Array 2:- 1,2,5,7,20 Array 3:- 1,2,3,5,6,7,9,11,16,20 9. Upadte the array so that an array element is followed by its revere - 1 Sample I/O Array 1:- 13,63,74,9,11,16 Updated Array 1:- 13,31,63,36,74,47,9,9,11,11,16,16 10.Spread the digits of the array in the same array. -1 Sample I/O Array 1:- 13,63,74,9,11,16 Updated Array 1:-1,3,6,3,74,9,1,1,1,6 11.Shift the boundary of array to have only 2 digit numbers. Sample I/O Array 1:- 139,643,74,9,101,126 Updated Array 1:- 13,96,43,74,91,11,26 12.Print the largest occuring digit in an array of N numbers. Sample I/O Array 1:- 13,63,74,9,11,16 1 occurs most.

2 Answers   Intel,


Explain this code. #include <stdio.h> void f1(int *k) { *k = *k + 10; } main ( ){ int i; i = 0; printf (" The value of i before call %d \n", i); f1 (&i); printf (" The value of i after call %d \n", i); }

3 Answers   IBM,


#define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }

14 Answers   CDAC, GATE, NDS, TCS,






How do we open a binary file in Read/Write mode in C?

0 Answers   Alter,


How to delete a node from linked list w/o using collectons?

0 Answers   Zycus Infotech,


What does the file stdio.h contain?

0 Answers  


If I want to initialize the array like. int a[5] = {0}; then it gives me all element 0. but if i give int a[5] = {5}; then 5 0 0 0 0 is ans. what will I do for all element 5 5 5 5 5 in a single statement???

3 Answers   Amdocs, IBM,


What is the advantage of c?

0 Answers  


what is the main use of c where it can use the c

2 Answers   Infosys,


Explain the term printf() and scanf() used in c language?

0 Answers  


Categories