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
Distinguish between actual and formal arguments.
What does it mean when a pointer is used in an if statement?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
What are bitwise shift operators in c programming?
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year
can any one provide me the notes of data structure for ignou cs-62 paper
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
What are c identifiers?
Multiply an Integer Number by 2 Without Using Multiplication Operator
write a program for the normal snake games find in most of the mobiles.
Are there any problems with performing mathematical operations on different variable types?
Can you define which header file to include at compile time?
How do I round numbers?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
Why static is used in c?