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 can I access an I o board directly?
What are local static variables? How can you use them?
Write a program to check armstrong number in c?
What is calloc malloc realloc in c?
Who developed c language and when?
What are directives in c?
How do we declare variables in c?
What do you mean by c what are the main characteristics of c language?
how is the examination pattern?
Do you know what are the properties of union in c?
Explain what is the difference between #include and #include 'file' ?
Can stdout be forced to print somewhere other than the screen?
code for quick sort?
Is a house a mass structure?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?