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
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
What are the features of the c language?
What are the parts of c program?
What is an endless loop?
What does void main return?
What is the difference between the = symbol and == symbol?
What is substring in c?
What is volatile c?
What is the method to save data in stack data structure type?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
What are the 5 elements of structure?
Is c pass by value or reference?
Write a program to generate random numbers in c?
What are the data types present in c?
Which is best linux os?