Answer Posted / lp
Declare a integer array size at runtime:
1.declare an interget pointer. - int *ptr
2.Get the size of array from user - int n
3.using malloc() ,allocate that many number of location to
the pointer. - ptr = malloc(n*sizeof(int));
4.Make use of the dynamically allocated array. - ptr[]
Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
How do you redirect a standard stream?
What are the two types of functions in c?
Explain Basic concepts of C language?
Is c high or low level?
What is time complexity c?
What is the difference between char array and char pointer?
How can you find the exact size of a data type in c?
What is the difference between fread buffer() and fwrite buffer()?
What are the basic data types associated with c?
What does c mean in standard form?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
How can you invoke another program from within a C program?
Explain goto?
What is s or c?
How are Structure passing and returning implemented by the complier?