Answer Posted / nithin
int main()
{
int i, max;
// Array
int *a;
printf("Enter the size of array\n");
scanf("%d", &max);
//Run time size allocation of an array
a = (int*)malloc(max * sizeof(int));
for(i = 0; i < max;i++)
{
a[i] = i * 2;
printf("value of element %d is %d\n", i, a
[i]);
}
return 0;
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
In C, What is the #line used for?
Explain built-in function?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
What is sizeof in c?
What is d scanf?
Explain how do you determine a file’s attributes?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
How can this be legal c?
Is c is a high level language?
How can I remove the trailing spaces from a string?
Write a code on reverse string and its complexity.
how to create duplicate link list using C???
What are the application of void data type in c?
What is 'bus error'?
How do you view the path?